Archives for the 'TDD' Category

A New Trick

I have read this post Interaction based testing using TypeMock.
This code:

Mock clientMock = MockManager.Mock(typeof (Client));
clientMock.Strict = true;

Client client = new Client();

Is exactly the same as this code:

MockObject<Client> clientMock = MockManager.MockObject<Client>();

Client client = clientMock.Object;

I prefer the latter, the main reason being that using MockObject  ensures that the Object is the one being mocked.
Here is an […]

7 August 2007 | TDD, .NET Tests | No Comments

Good Programming is about Balance

This post hits the nail on its head: When good programming practices are just too good.
What struck me … is the ridiculous amount of code required to implement simple things.

I love this paragraph
We all love rules - with them, you don’t have to think much, you just apply what the smart guys think is the […]

19 June 2007 | TDD, .NET Tests | No Comments

Design vs. Process

Oren Eini has posted Tools vs. Design about the Really Simple Dialog post.
It is NOT the design that will give you the freedom to expand and build extendable and maintainable systems. It is impossible to see the future and to implement the best design, that is what YAGNI is about. It is the process that will allow us […]

11 June 2007 | TDD, .NET Tests | No Comments

Extending Test Frameworks

One really nice feature of TypeMock.NET 4.0 is the ability to extend any/all testing frameworks.
Each test framework has (or lacks) its own extension mechanism, making it hard add extension to all the frameworks. With TypeMock we can now write an new test decorator that will work for all frameworks, including vsTest and nunit, and all runner-tools including […]

7 June 2007 | TDD, .NET Tests | 5 Comments

Natural Mocks becoming more intelligent

Natural Mocks automatically mocks everything. This includes return values. So the following code:

using (RecordedExpecations recorder = RecorderManager.StartRecording())
{
DummyClass.DoWork();
recorder.Return(new SqlInt32(1));
}

Won’t work as expected because SqlInt32 is being mocked.
This has bugged me a few times and I simply created the return value outside the recorder.

SqlInt32 mockValue = new SqlInt32(1));
using (RecordedExpecations recorder = RecorderManager.StartRecording())
{
[…]

25 March 2007 | TDD, Product | 1 Comment

Design and Testability - YAGNI

After reading Roy’s Post and Oren’s Post who strongly side on Designing for testability I suddenly felt a De Ja Vu.
De Ja Vu
A few years ago, I was managing a project in a big company. One of the features that we where developing was a caching system. We needed the caching to boost performance on a […]

4 March 2007 | TDD, .NET Tests | 12 Comments

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

14 facets of TypeMock.NET and Designing for Testability

There has been much talk about Designing for Testability lately.Basically the argument is:

Should our Tests (Enabling Mock Insersions) Drive our design?or should we use tools to do it for us?

Here is what 14 of are our community have to say about it:
Still Debating

Pondering Mocks - Tim Haughton,Tim is debating Designing for Testability“On first inspection, I […]

26 September 2006 | TDD, .NET Tests | No Comments

TypeMock and TestDriven.NET

TypeMock.NET and TestDriven are now sold together - for a limited time only.
These tool complement each other and using them you can:
Write tests with TypeMock.NET and Run them from within Visual Studio with TestDriven.NET
I have been working with Jamie Consdale on integrating these tool even more
So watch out for more features.

We […]

26 September 2006 | TDD, Product | No Comments

Search Eli Lopian’s Blog (TypeMock)

Navigation

Recent Posts

Categories

Archives

Managment