public void UsageGetWithNotSameTypeTest() { LxDb db = new LxDb(DatabaseFile); using (var session = db.OpenSession()) { session.Save("10", new MyContainer { Name = "MyName", Id = 15, OtherIds = new List<int> {1, 2, 3} }); // Exception.Message mentions the type that has been stored. session.Get<MyOtherContainer>("10"); } }
public void UsageRemoveTest() { LxDb db = new LxDb(DatabaseFile); using (var session = db.OpenSession()) { session.Save("10", new MyContainer { Name = "MyName", Id = 15, OtherIds = new List<int> {1, 2, 3} }); var retrieved = session.Get<MyContainer>("10"); CheckExists(retrieved); session.Remove("10"); retrieved = session.Get<MyContainer>("10"); Assert.IsNull(retrieved); } }
public CredentialStore(string location) { _db = new LxDb(location); }