public void For_That_IsNotNull() { Object x = null; AssertPasses(() => Expect.For("myMsg").That("x").IsNotNull()); AssertFails(() => Expect.For("myMsg").That(x).IsNotNull()); }
public void For_That_Throws() { AssertPasses(() => Expect.For("myMsg").That(() => { throw new Exception("SomeError"); }).Throws(AnException.With().Message("SomeError"))); AssertFails(() => Expect.For("myMsg").That(() => { throw new Exception("Wrong Error Msg"); }).Throws(AnException.With().Message("SomeError"))); }
public void For_That_IsEqualTo() { AssertPasses(() => Expect.For("myMsg").That("x").IsEqualTo("x")); AssertFails(() => Expect.For("myMsg").That("x").IsEqualTo("y")); }
public void For_That_Is_Matcher() { AssertPasses(() => Expect.For("myMsg").That("x").Is(AString.EqualTo("x"))); AssertFails(() => Expect.For("myMsg").That("x").Is(AString.EqualTo("y"))); }