public void Model_Calls_Valid_ExpectNotPhoneNumberErrors() { var model = new CallsModel { Called = "test" }; var results = TestModelHelper.Validate(model); Assert.AreEqual(1, results.Count); Assert.AreEqual("Not a valid Phone number", results[0].ErrorMessage); }
public void Model_Calls_Valid_ExpectTypeRquiredErrors() { var model = new CallsModel { Cost = 0 }; var results = TestModelHelper.Validate(model); Assert.AreEqual(1, results.Count); Assert.AreEqual("The Called field is required.", results[0].ErrorMessage); }
public void Model_Calls_Valid_Exists() { var model = new CallsModel(); Assert.IsNotNull(model); }