예제 #1
0
    public void TestMultiplication_with_positive_overflow()
    {
        var cth = new CalculatorTestHarness(new Calculator());

        Assert.Equal("Multiply failed for mixed or positive operands. Arithmetic operation resulted in an overflow.",
                     cth.TestMultiplication(Int32.MaxValue, Int32.MaxValue));
    }
예제 #2
0
    public void Multiply_with_overflow_throws_calculationexception()
    {
        var cth = new CalculatorTestHarness(new Calculator());

        Assert.Throws <CalculationException>(() => cth.Multiply(Int32.MaxValue, Int32.MaxValue));
    }
예제 #3
0
    public void Call_TestMultiplication_with_success()
    {
        var cth = new CalculatorTestHarness(new Calculator());

        Assert.Equal("Multiply succeeded", cth.TestMultiplication(6, 7));
    }