public void DeleteNull() { var litedb = new LiteDBDAL(); var result = litedb.DeleteItem <TestObject>(null); Assert.IsFalse(result); }
public void DeleteMiss() { var litedb = new LiteDBDAL(); var result = litedb.DeleteItem(new TestObject()); Assert.IsFalse(result); }
public void ContainsMiss() { var litedb = new LiteDBDAL(); var contains = litedb.Contains <TestObject>(a => a.ID == 0); Assert.IsFalse(contains); }
public void ContainsNullItem() { var litedb = new LiteDBDAL(); var contains = litedb.Contains <TestObject>(a => a == null); Assert.IsFalse(contains); }
public void GetNullItem() { var litedb = new LiteDBDAL(); var val = litedb.GetItem <TestObject>(a => a.ID == 0); Assert.IsNull(val); }
public void ContainsHit() { var litedb = new LiteDBDAL(); var resultID = litedb.AddItem(new TestObject()); Assert.IsTrue(resultID > 0); var contains = litedb.Contains <TestObject>(a => a.ID == resultID); Assert.IsTrue(contains); }
public void DeleteHit() { var litedb = new LiteDBDAL(); var deleteResult = litedb.DeleteAll <TestObject>(); Assert.IsTrue(deleteResult); var resultID = litedb.AddItem(new TestObject()); var item = litedb.GetItem <TestObject>(a => a.ID == resultID); Assert.IsNotNull(item); var result = litedb.DeleteItem(item); Assert.IsTrue(result); }
protected override void CreateDbFile(LiteDBDAL litedbDal) { litedbDal.CreateDbFile <NeuraliumWalletTimeline, long>(i => i.Id); litedbDal.CreateDbFile <NeuraliumWalletTimelineDay, int>(i => i.Id); }