示例#1
0
        public void BasicTest()
        {
            Check.That("Unit").IsNotEmpty();

            Check.ThatCode(() => Check.That("Unit").IsEqualTo("great")).Throws <AssertionException>();
            Check.ThatCode(() => Assuming.That("Unit").IsEqualTo("great")).Throws <InconclusiveException>();
        }
示例#2
0
 public void AssumptionScanTest()
 {
     Assuming.That(2).IsEqualTo(2);
     Check.ThatCode(() => Assuming.That(2).IsEqualTo(0)).Throws <XunitException>();
     Check.ThatCode(() => Assuming.That(2).IsEqualTo(0)).IsAFailingAssumption();
 }
示例#3
0
 public void AssumptionTest()
 {
     Check.ThatCode(() => Assuming.That("MsTest").IsEqualTo("great")).Throws <AssertInconclusiveException>();
 }
示例#4
0
 private static void AssumptionTest()
 {
     Check.ThatCode(() => Assuming.That(2).IsEqualTo(3)).Throws <FluentCheckException>();
     Check.ThatCode(() => Assuming.That(2).IsEqualTo(3)).IsAFailingAssumption();
 }
示例#5
0
 public void ProvideIgnoreForObjectCheck()
 {
     Assuming.That(12).IsEqualTo(12);
     Check.ThatCode(() => Assuming.That(12).IsEqualTo(13)).IsAFailingAssumption();
 }
示例#6
0
 public void ProvideIgnoreForTypeCheck()
 {
     Assuming.That <int>().IsEqualTo(typeof(int));
     Check.ThatCode(() => Assuming.That <int>().IsInstanceOf <int>()).IsAFailingAssumption();
 }
示例#7
0
 public void AssumptionScanTest()
 {
     // inject a type from the fuzzing assembly to check for some degenerative case
     Assuming.That(2).IsEqualTo(2);
     Assuming.ThatCode(() => Check.That(2).IsEqualTo(0)).Throws <XunitException>();
 }
示例#8
0
 public void ProvideIgnoreForStructCheck()
 {
     Assuming.That(4).IsEqualTo(4);
     Check.ThatCode(() => Assuming.That(4).IsEqualTo(5)).IsAFailingAssumption();
 }