Esempio n. 1
0
 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")));
 }
Esempio n. 2
0
 public void That_IsEqualTo()
 {
     AssertPasses(() => Expect.That("x").IsEqualTo("x"));
     AssertFails(() => Expect.That("x").IsEqualTo("y"));
 }
Esempio n. 3
0
 public void For_That_IsEqualTo()
 {
     AssertPasses(() => Expect.For("myMsg").That("x").IsEqualTo("x"));
     AssertFails(() => Expect.For("myMsg").That("x").IsEqualTo("y"));
 }
Esempio n. 4
0
 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")));
 }