public void TestDateRangeGood() { m1 = new MemberValidation(0, 1, "John Doe", "*****@*****.**"); // insert - no exception because default dates are inside valid range m1.Persist(); // clean up m1.Remove(); }
public void CustomValidatorBad() { // exception because listid < id m1 = new MemberValidation(1, 0, "John Doe", "*****@*****.**"); // insert m1.Persist(); // clean up (not executed unless Persist erroneously succeeds) m1.Remove(); }
public void CustomValidatorGood() { // no exception because listid > id m1 = new MemberValidation(0, 1, "John Doe", "*****@*****.**"); // insert m1.Persist(); // clean up m1.Remove(); }
public void TestRequiredBadButAllowNull() { // test that an empty email address throws an exception m1 = new Member(list.Id, null, "*****@*****.**"); // insert m1.Persist(); // delete m1.Remove(); }
public void TestRequiredGood() { // test that an email address (required field) entered passes validation m1 = new Member(list.Id, "John Doe", "*****@*****.**"); // insert m1.Persist(); Assert.AreEqual(m1.Name, "John Doe", "The object was not properly inserted!"); Assert.AreEqual(m1.Address, "*****@*****.**", "The object was not properly inserted!"); // delete m1.Remove(); }
public void TestRegexGoodData() { // test that a `good` email address can be entered in the database m1 = new Member(list.Id, "John Doe", "*****@*****.**"); // insert m1.Persist(); Assert.AreEqual(m1.Name, "John Doe", "The object was not properly inserted!"); Assert.AreEqual(m1.Address, "*****@*****.**", "The object was not properly inserted!"); // delete m1.Remove(); }
public void TestRegexGoodData() { // test that a `good` email address can be entered in the database m1 = new Member( list.Id, "John Doe", "*****@*****.**" ); // insert m1.Persist(); Assert.AreEqual( m1.Name, "John Doe", "The object was not properly inserted!" ); Assert.AreEqual( m1.Address, "*****@*****.**", "The object was not properly inserted!" ); // delete m1.Remove(); }
public void TestRequiredGood() { // test that an email address (required field) entered passes validation m1 = new Member( list.Id, "John Doe", "*****@*****.**" ); // insert m1.Persist(); Assert.AreEqual( m1.Name, "John Doe", "The object was not properly inserted!" ); Assert.AreEqual( m1.Address, "*****@*****.**", "The object was not properly inserted!" ); // delete m1.Remove(); }
public void CustomValidatorBad() { // exception because listid < id m1 = new MemberValidation( 1, 0, "John Doe", "*****@*****.**" ); // insert m1.Persist(); // clean up (not executed unless Persist erroneously succeeds) m1.Remove(); }
public void CustomValidatorGood() { // no exception because listid > id m1 = new MemberValidation( 0, 1, "John Doe", "*****@*****.**" ); // insert m1.Persist(); // clean up m1.Remove(); }
public void TestDateRangeGood() { m1 = new MemberValidation( 0, 1, "John Doe", "*****@*****.**" ); // insert - no exception because default dates are inside valid range m1.Persist(); // clean up m1.Remove(); }
public void TestRequiredBadButAllowNull() { // test that an empty email address throws an exception m1 = new Member( list.Id, null, "*****@*****.**" ); // insert m1.Persist(); // delete m1.Remove(); }