Views: (1789) Watched: (3866)
In this episode we are going to take a look at how to utilize some additional features in the Code Contracts library to validate the state of our application.
We are going to focus our efforts here to learn how to use Assert and Assume to validate a given value in our code. We will also learn how to use ForAll and Exists, which can be used to validate content inside of an array or a collection.
Views: (1823) Watched: (2553)
In this episode we are going to take a look at how to use manual mocks for testing
Often times when creating unit tests we need to work in isolation in order to cover the paths we are attempting to test. When we want to test in isolation you can use a testing technique where you mock out your dependencies. When using Mocks you can either do it manually (what we are looking at) or you can use a mocking framework like Rhino Mocks. Either way you achieve the same results.
Views: (1617) Watched: (2801)
In this episode we are going to take a look at another refactoring technique, the Extract Interface technique.
This technique allows you to extract an interface from a class in order to break your concrete dependencies. By doing this you can provide yourself with better testing support as well as a better layer of abstractions.
Views: (1788) Watched: (2982)
In this episode we are going to take a look at a refactoring technique outlined in detail in Working Effectively with Legacy Code
We will walk though this technique and take a look at how it can help you to create better and more maintainable code.
--- Sponsor Information ---
ANTS Memory Profiler 5 out now. It’s a must have in your toolbox if you program in C# or VB.NET.
Download your free trial of ANTS Memory Profiler here.