public void TestObjectsCanBeDeleted() { var persistedObject = new PersistedString { Content = "content", Id = "Id" }; PersistanceStore.Save(persistedObject); var saved = PersistanceStore.Get <PersistedString>("Id"); Assert.IsNotNull(saved); PersistanceStore.Delete <PersistedString>("Id"); saved = PersistanceStore.Get <PersistedString>("Id"); Assert.IsNull(saved); }
public void Delete(string trackingId) { _logger.DebugFormat("Delete for tracking {0}", trackingId); var toDelete = Get(trackingId).ToArray(); if (toDelete.Any()) { _logger.DebugFormat("Found {0} results", toDelete.Count()); _persistanceStore.Delete <DomainResult>(toDelete.Select(x => x.Id).ToArray()); } else { _logger.DebugFormat("Found no results"); } }