public void CleanTest() { var target = new EmailField(); // OK values target.Clean("*****@*****.**"); target.Clean("*****@*****.**"); target.Clean("*****@*****.**"); target.Clean("*****@*****.**"); // Bad values AssertExtras.Raises <ValidationException>(delegate() { target.Clean("test+person"); }); AssertExtras.Raises <ValidationException>(delegate() { target.Clean("test+person@"); }); AssertExtras.Raises <ValidationException>(delegate() { target.Clean("test+person@example"); }); }