public void Prig_should_assert_call_on_void() { using (new IndirectionsContext()) { // Arrange var called = false; PFoo.Execute().Body = @this => called = true; // Act new Foo().Execute(); // Assert Assert.IsTrue(called); } }
public void Prig_should_assert_call_on_void_through_an_interface() { using (new IndirectionsContext()) { // Arrange var called = false; PFoo.Execute().Body = @this => called = true; var foo = new Foo(); // Act var iFoo = (IFoo)foo; iFoo.Execute(); // Assert Assert.IsTrue(called); } }