Archives for August 2007

Mocking Linq - Preview

We are working on our .NET 3.5 Support. There are many new feature that have been added, we will take a look at how to mock a linq statement
For the following code in our application

Northwind db = new Northwind(connStr) ;
var query = from c in db.Customers
where c.City == “Sarasota“
select new { c.Name, c.City };

Here is […]

19 August 2007 | Product | 4 Comments

Dependency Injection - Keep your privates to yourself

Jacob Proffitt has hit the nail on the head with his “I do wish that people would admit that DI doesn’t have compelling applicability outside of Unit Testing” post, the discussion continues with Nate Kohari response post and Jacobs counter post. Oren has also joined in with two posts.
Here a some ideas for you to think about.
DI […]

19 August 2007 | TDD, .NET Tests | 3 Comments

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

Search Eli Lopian’s Blog (TypeMock)

Navigation

Recent Posts

Categories

Archives

Managment