Ejemplo n.º 1
0
        public void LogRepositoryMock_Delete_InValid_Bogus_Item_Should_Pass()
        {
            // Delete the first item from the list, and then check the list to verify it is gone

            // Arange
            var myData = new LogRepositoryMock();

            // Act
            var newItem = myData.Delete("bogus");

            // Assert
            Assert.AreEqual(false, newItem);
        }
Ejemplo n.º 2
0
        public void LogRepositoryMock_Delete_First_Item_Should_Pass()
        {
            // Delete the first item from the list, and then check the list to verify it is gone

            // Arange
            var myData = new LogRepositoryMock();

            // Get the first item from the list
            var oldItem = myData.Index().First();

            // Act
            var result  = myData.Delete(oldItem.ID);
            var newItem = myData.Index().First();

            // Assert
            Assert.AreNotEqual(oldItem.ID, newItem.ID);
        }