Esempio n. 1
0
        public void AsIntTest()
        {
            AssertPasses("0", AString.As(AnInt.EqualTo(0)));
            AssertPasses("1", AString.As(AnInt.EqualTo(1)));
            AssertPasses("999", AString.As(AnInt.GreaterThan(50)));

            AssertFails((string)null, AString.As(AnInt.EqualTo(0)));
            AssertFails("", AString.As(AnInt.EqualTo(0)));
            AssertFails(" ", AString.As(AnInt.EqualTo(0)));
            AssertFails("zero", AString.As(AnInt.EqualTo(0)));
        }
Esempio n. 2
0
 public void GreaterThanTest()
 {
     AssertFails(9, AnInt.GreaterThan(10));
     AssertFails(10, AnInt.GreaterThan(10));
     AssertPasses(11, AnInt.GreaterThan(10));
 }