public void can_mix_predicates_and_assertions() { var SaysHelloWorld = new NamedPredicate(o => (o as A).Value == "Hello, world", "Should greet the world"); Check.Result result = Check.That(subject).Two.X[Should.Be <A>(), SaysHelloWorld]; Assert.That(result.Success, Is.True); }
public void can_mix_predicates_and_assertions_with_failure() { var FrankieSaysRelax = new NamedPredicate(o => (o as A).Value == "Relax", "You should relax more"); Check.Result result = Check.That(subject).Two.X[Should.Be <A>(), FrankieSaysRelax]; Assert.That(result.Success, Is.False); Assert.That(result.Reasons, Contains.Item("BaseThing.Two.X You should relax more")); }