Inline Specification

Validate Inline Specification

var validationNotification = Specification.Validate(sp => 
		{
			sp.Check(s => request.Field1).Required().EqualTo("Yellow"));
			sp.Check(s => request.Field2).Required().EqualTo("Blue"));
		})

Assert Inline Specification

If the supplied specification is invalid this statement will throw a ValidationNotificationException.

Specification.Assert(sp => 
		{
			sp.Check(s => request.Field1).Required().EqualTo("Yellow"));
			sp.Check(s => request.Field2).Required().EqualTo("Blue"));
		})


Last edited Jan 11, 2012 at 4:07 AM by TechnoAg, version 1

Comments

No comments yet.