Archives for October 2006

How Hierarchy works with TypeMock

Mocking methods in the hierarchy of the code is supporting in TypeMock.NET.There is nothing like examples so here is our hierarchy.

We are mocking type Second

A mocked method, will not be mock when called from a derived class. Example: Mocking DoSomething() will not be mocked if it is called from Third.

Mock mock = MockManager.Mock(typeof […]

31 October 2006 | .NET Tests | 1 Comment

How Dynamic Mock Objects can Auto Pilot

When creating a Mock Object from an interface, the object is set in Strict mode. This means that any unexpected call to the object will fail.The reason is quite simple. It is because there is no real implementation of any methods.
Since version 3.6.1 Dynamic Mock Objects will have a real default implementation. The implementation will […]

31 October 2006 | .NET Tests | 1 Comment

Multiple Asserts in a Single Unit Test

There is a debate going on about having one assertion per test.
James Avery argues that what he’d really like to see in a unit test framework is the ability to run (and fail) multiple asserts within the same test and Roy Osherov still argues that there is value in having one assertion only.
I am less […]

31 October 2006 | TDD, .NET Tests | 1 Comment

TestDriven.NET 2.0 is released

Jamie has just released TestDriven.NET 2.0. I have worked with Jamie quite a bit on the TypeMock.NET integration and now using TypeMock with Zero Friction Testing is easier then ever.
The integration enables testing with TypeMock with a click of  button, it also enables automatic linking of TypeMock with NCover.
Way to go Jamie.
Bookmark at:          

31 October 2006 | .NET Tests | No Comments

How to Mock Singletons in 3 Simple Ways

Want to mock Singletons?
Here are 3 simple ways to mock a Singletons.
1. Use MockAll
When the static constructor is not mocked just use MockAll

Mock theSingletonMock = MockManager.MockAll(typeof(Singleton),
Constructor.StaticNotMocked);

or to mock the constructor

Mock theSingletonMock = MockManager.MockAll(typeof(Singleton),
Constructor.NotMocked);

Remember that you can only MockAll once until all mocks are verified/cleared. To retrieve the mock simply use:

Mock theSingletonMock = MockManager.GetMockAll(typeof(Singleton));

2. […]

15 October 2006 | .NET Tests | No Comments

Don’t call us we’ll call you

Testing how events are hooked up to your system can be tricky, TypeMock.NET makes this easier.
Testing the plumbing
Lets see how we test a class that fires events.
Here is a snippet from a List that fires event whenever an Item is added

public class ListWithChangedEvent : ArrayList
{
// An event that clients can use […]

8 October 2006 | .NET Tests | 1 Comment

How to Debug with TypeMock.NET without losing your head

TypeMock.NET has many internal features that allow debugging code that has some mocked methods, and although this works most of the time, there are some things you need to watch out for. All these have to do with the Visual Studio’s Property Evaluation or funceval (see Mike Stall’s - Func-eval is evil post)
Basically whenever you […]

8 October 2006 | .NET Tests, Debugging | No Comments

Low Coupling is NOT a Silver Bullet

I will start with some more post about TypeMock and Testability issue.

Mocking with TypeMock - Travis Illig

Holy crap, this thing is hot. In technical terms, you might call it the bomb-diggity.I haven’t been this stoked about a technology for quite some time.

TypeMock is wonderful - Ken Robertson

TypeMock is absolutely awesome.  No, no, it is sexy.  It […]

4 October 2006 | .NET Tests | 2 Comments

Price changes

Our prices are going to rise at the beginning of Next Month. All developers who are evaluating TypeMock are highly recommend to purchase before November to enjoy our low prices.
Price Changes: (not final)

Enterprise Edition Plus 1 Year Maintenance: $299
Professional Edition Plus 1 Year: $199
Annual Maintenance: $49

Bookmark at:          

4 October 2006 | Product | No Comments

MailFrame’s CodeSpell

I had quite an embarrassing moment when Scott Hanselman who is reviewing TypeMock.NET sent me his first impressions.
The e-mails where screen-shots of spelling typo’s in TypeMock’s API’s documentation. It turns out that there are quite a few spelling mistakes in the API’s documentation.
Well, we added a task to fix all these, but […]

4 October 2006 | Reviews | No Comments

Search Eli Lopian’s Blog (TypeMock)

Navigation

Recent Posts

Categories

Archives

Managment