public void TestConfigWorks() { var config = new TestConfiguration(); using (var session = new InMemoryDatabase(config).BeginSession()) { session.Insert(new Post() { Title = "Foo" }); Assert.Equal("Foo", session.Get <Post>(1).Title); } }
public void Update(TData data) { InMemoryDatabase.Get <TData>()[data.Rsn] = data; }
public void RemoveAll() { InMemoryDatabase.Get <TData>().Clear(); }
public void Destroy(TData data) { InMemoryDatabase.Get <TData>().Remove(data.Rsn); }
/// <summary> /// Will mark the <paramref name="data"/> as logically (or soft) by setting <see cref="Entity.IsLogicallyDeleted"/> to true /// </summary> public void Remove(TData data) { InMemoryDatabase.Get <TData>()[data.Rsn].IsLogicallyDeleted = true; }
public void Add(TData data) { InMemoryDatabase.Get <TData>().Add(data.Rsn, data); }
public ArticleCommentServiceTests() { this.db = InMemoryDatabase.Get(); AutomapperInitializer.Initialize(); }