public void class_method2_exception() { var if1 = Substitute.For<Interface1>(); var if2 = Substitute.For<Interface2>(); var target = new Class1(if1, if2); var e = Record.Exception(() => target.Method2()); Assert.IsType<ArgumentException>(e); }
public void class1_method1_positive() { var if1 = Substitute.For<Interface1>(); var if2 = Substitute.For<Interface2>(); var target = new Class1(if1, if2); target.Method1(1); if1.Received().Method1(); if2.DidNotReceive().Method1(); }