Views: (2302) Watched: (4260)
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: (2285) Watched: (2821)
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: (2069) Watched: (3093)
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: (2319) Watched: (3269)
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.