public void UnexpectedNotRaised() { var mc = new MyClass(false); RunTest(AnyValue.IsValid, () => mc.Method(), SmartAssert.NotRaised("MyEvent")); }
public void UnexpectedRaised() { var exception = Assert.Catch <SmartTestException>(() => { var mc = new MyClass(true); RunTest(AnyValue.IsValid, () => mc.Method(), SmartAssert.NotRaised("MyEvent")); }); Assert.AreEqual("Event 'EventHandlerTestsImplicit+MyClass.MyEvent' was unexpected", exception.Message); }
public void UnexpectedNotEvent() { var exception = Assert.Catch <BadTestException>(() => { var mc = new MyClass(true); RunTest(AnyValue.IsValid, () => mc.Method(), SmartAssert.NotRaised("NotEvent")); }); Assert.AreEqual("BAD TEST: 'NotEvent' is not an event of type 'EventHandlerTestsImplicit+MyClass'", exception.Message); }