Exemple #1
0
 public ObjectAssertion IsInvalid()
 {
     return(ObjectAssertion.New(
                Name.If("Name2").IsLongerThan(5),
                Number.If("Number2").IsEqualTo(0)
                ));
 }
Exemple #2
0
 ObjectAssertion CanDelete(A a)
 {
     return(ObjectAssertion.New(
                a.If().IsTrue(x => x.B == 1, "B must not be 1"),
                a.If().IsTrue(x => x.C == 2, "C must not be 2")
                ));
 }
Exemple #3
0
 public ObjectAssertion IsInvalid()
 {
     return(ObjectAssertion.New(
                Name.If("Name1").IsLongerThan(6),
                Number.If("Number1").IsEqualTo(0),
                Prop.If("Prop").IsInvalid
                ));
 }
Exemple #4
0
 ObjectAssertion CanUpdate(A a)
 {
     //this is not testing to see if something is invalid ... its testing validity
     return(ObjectAssertion.New(
                a.If().EvalPositive.IsTrue(x => x.B == 1, "B must be 1"),
                a.If().EvalPositive.IsTrue(x => x.C == 2, "C must be 2")
                ));
 }
 public ObjectAssertion IsInvalid()
 {
     return(ObjectAssertion.New(_mail.If("mail address").IsNull.IsNotValidEmail));
 }