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 That_IsEqualTo() { AssertPasses(() => Expect.That("x").IsEqualTo("x")); AssertFails(() => Expect.That("x").IsEqualTo("y")); }
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"))); }