Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void Model_Calls_Valid_Exists()
 {
     var model = new CallsModel();
     Assert.IsNotNull(model);
 }