public void TestRemoveKey()
 {
     Assert.IsFalse(_target.IsDirty, "Dirty flag set prematurely");
     Assert.AreEqual(0, _target.NextKey, "Next key is incorrect.");
     _target.AddKeyAsync(_models[0].Key).Wait();
     Assert.IsTrue(_target.IsDirty, "Dirty flag not set on add.");
     Assert.AreEqual(1, _target.NextKey, "Next key not advanced.");
     _target.RemoveKeyAsync(_models[0].Key).Wait();
     Assert.AreEqual(0, _target.Query.Count(), "Key was not removed.");
 }
Exemple #2
0
 public void TestRemoveKey()
 {
     Assert.False(_target.IsDirty);    //Dirty flag set prematurely");
     Assert.Equal(0, _target.NextKey); //Next key is incorrect.");
     _target.AddKeyAsync(_models[0].Key).Wait();
     Assert.True(_target.IsDirty);     //Dirty flag not set on add.");
     Assert.Equal(1, _target.NextKey); //Next key not advanced.");
     _target.RemoveKeyAsync(_models[0].Key).Wait();
     Assert.Empty(_target.Query);      //Key was not removed.");
 }