/// <summary> /// Updates <paramref name="item"/> in the storage /// </summary> /// <param name="item">the feature to update</param> public void Update(Feature item) { _featureDb.Remove(item); _featureDb.Add(item); }
/// <summary> /// Deletes the <paramref name="item"/> from the storage /// </summary> /// <param name="item">the feature to delete</param> public void Delete(Feature item) { _featureDb.Remove(item); }
/// <summary> /// Adds <paramref name="item"/> to the storage /// </summary> /// <param name="item">the feature to add</param> public void Add(Feature item) { _featureDb.Add(item); }
public void should_add_a_new_feature() { // Arrange var f = new Feature { Name = "Test feature", Description = "Some descriptive text", Status = FeatureStatus.NotStarted }; var numberOfFeaturesBefore = _dbWrapper.All().Count; // Act _dbWrapper.Add(f); // Assert var numberOfFeaturesAfter = _dbWrapper.All().Count; Assert.AreEqual(numberOfFeaturesAfter, numberOfFeaturesBefore +1 ); }