Initializer Collections

Even with a fluent interface, it can become laborious to retype the same few initializers every time you create a unit test. For that reason, initializers can be grouped into collections so that a baseline for every test can be composed of more discrete parts:

public class CalculatorIsReadyToRun : InitializerCollection
	protected override void Register()
public class AddingNumbersThatCauseOverflowShouldThrowOverflowException : UnitTest<Calculator, int>
        public override void Run()

                When<AddingTwoNumbers>(int.MaxValue, 1);


Last edited Aug 15, 2011 at 1:52 PM by garymcleanhall, version 1


No comments yet.