public void TestFindAfterUpdating() { var db = new BookingDB(); (int, BookingType)key = (1, BookingType.Event); List <int> oldValues = new List <int>() { 101, 102, 103 }; List <int> newValues = new List <int>() { 201, 202, 203 }; db.AddOrUpdate(key, oldValues); db.AddOrUpdate(key, newValues); var returnedValues = db.Find(key); Assert.Equal(newValues, returnedValues); }
public void TestDbIsNotEmpty() { var db = new BookingDB(); (int, BookingType)key = (1, BookingType.Event); List <int> values = new List <int>() { 101, 102, 103 }; db.AddOrUpdate(key, values); Assert.False(db.IsEmpty()); }
public void TestRemove() { var db = new BookingDB(); (int, BookingType)key = (1, BookingType.Event); List <int> values = new List <int>() { 101, 102, 103 }; db.AddOrUpdate(key, values); db.Remove(key); Assert.Null(db.Find(key)); }