コード例 #1
0
        public void Null_KidDataAccess_Update_ThrowError()
        {
            // Arrange
            var addKid = new KidDataAccess();

            // Act
            // Assert
            Assert.Throws<ArgumentException>(() => addKid.Update(null));

        }
コード例 #2
0
        public void EmptyRecord_KidDataAccess_Update_ThrowError()
        {
            // Arrange
            var newKid = new Kid();
            var addKid = new KidDataAccess();

            // Act
            // Assert
            Assert.Throws<ArgumentException>(() => addKid.Update(newKid));

        }
コード例 #3
0
        public void Valid_KidDataAccess_Update_updateKid(string name, string email)
        {
            // Arrange
            var updateKid = new Kid();
            updateKid.KidID = _integrationForUpdate;
            updateKid.Name = name;
            updateKid.Email = email;
            var addKid = new KidDataAccess();

            // Act
            var result = addKid.Update(updateKid);

            // Assert
            Assert.AreEqual(true, result, "We should have Updated the Record");

        }