Пример #1
0
        public void Example_Update_Valid_Data_Good_Should_Pass()
        {
            // Arrange
            var myData    = new ExampleModel();
            var myDataNew = new ExampleModel
            {
                Name = "New",

                // TODO:  Add your atttrbutes here

                ID = myData.ID
            };

            // Act
            myData.Update(myDataNew);
            myData.Date = myData.Date.AddSeconds(-5);

            // Assert
            Assert.AreEqual("New", myData.Name);
            // TODO:  Add an Assert for each attribute that should change


            Assert.AreNotEqual(myData.Date, myDataNew.Date);
            // TODO:  Add an Assert for each attribute that thould Not change
        }
Пример #2
0
        public void Example_Update_InValid_Data_Null_Should_Fail()
        {
            // Arrange
            var myData = new ExampleModel();

            // Act
            var result = myData.Update(null);

            // Assert
            Assert.AreEqual(false, result);
        }