public void Remove_IsObjectRemovedCorrectly_ShouldReturnTrue() { // Arrange var lifeTimeStorage = new LifeTimeStorage <string>(_log, "TEST", 10, 0); // Act lifeTimeStorage.Put("test_key", "test_tag"); lifeTimeStorage.Remove("test_key"); bool isStoredObjectStillThere = lifeTimeStorage.Exists("test_key"); // Assert Assert.IsTrue(!isStoredObjectStillThere); lifeTimeStorage.Clear(); }
public void Put_IsObjectInserted_ShouldReturnTrue() { // Arrange var lifeTimeStorage = new LifeTimeStorage <string>(_log, "TEST", 10, 0); // Act lifeTimeStorage.Put("test_key", "test_tag"); var storedObject = lifeTimeStorage.Get("test_key"); lifeTimeStorage.Remove("test_key"); // Assert Assert.IsTrue(storedObject != null); lifeTimeStorage.Clear(); }