AOUT.CH9.Examples.Tests.MyOverridableClassTests.DoSomething_GivenInvalidInput_ThrowsException C# (CSharp) Method

DoSomething_GivenInvalidInput_ThrowsException() private method

private DoSomething_GivenInvalidInput_ThrowsException ( ) : void
return void
        public void DoSomething_GivenInvalidInput_ThrowsException()
        {
            MyOverridableClass c = new MyOverridableClass();
            int SOME_NUMBER=1;

            //stub the calculation method to return "invalid"
            c.calculateMethod = delegate(int i) { return -1; };

            c.DoSomeAction(SOME_NUMBER);
        }