Posts Tagged: AAA

How-To: Setting Behavior for Future Objects with Isolator++

One of the biggest hurdles in writing tests for legacy code are future dependencies. They are called “future” objects, because they are created inside the class under test, rather then injected into it by the ...

Read More

Debugging the Undebuggable

I bumped up against an interesting problem today. I was trying to write a unit test for our CRM code (I’ll write about my endeavor in a another post). Anyway, I was trying to test ...

Read More

How to fake C++ objects with Isolator++ (Beta)

It seems like everything in the C++ world is harder – you have two files per class, no garbage collection and you need to know your pointer tricks to get things done. It would have ...

Read More

How to verify a method call on a dependency

Guest post by Lior Friedman. Interaction testing is a common type of unit testing. In this type of tests, one checks that a specific unit “interacts” with another way according to an agreed protocol, usually ...

Read More

How to fake method’s parameters

Although Typemock Isolator know how to fake out and ref parameters there are times that a certain parameter passed to shall return a specific value. Consider this scenario – a call to a stream object: ...

Read More

WCF Tip – How to unit test an ErrorProvider

A while ago this problem was brought to my attention by one of our customers: WCF enable us to add a custom error handler as part of the service implementation: The implementation of ErrorHandler is ...

Read More

Quick tip – How to fake a singleton

The singleton pattern is well known and used in many software projects. Faking Singleton can be done by replacing the singleton class on creation or by faking the property (or method) that returns the singleton. ...

Read More

Faking WCF Async Calls – Part II

In the last post, I simulated an asynchronous call to WCF, by setting custom code behavior on the Begin and End. But that’s not enough. I want to make that even shorter and readable. And ...

Read More

Faking Async Calls in WCF – Part I

Once upon a time, I wrote about writing tests for WCF servers and clients. WCF can be invoked also in an async method. What you would do is generate WCF proxies that have method definition ...

Read More

WCF tip – How to fake a method inside WebOperationContext

One of our customers had a very interesting problem. When using he needed to set WCF’s WebOperationContext.Current.IncomingRequest.UserAgent to return a specific string. Usually this would not have been a problem using the AAA API: 1: ...

Read More
TOP