public void ModelTrackerCollection_ExistingCollection_AddRemoveModel_RemoveReturnsTrue() { var m = new TestModel(); Existing.Add(m); Assert.IsTrue(Existing.Remove(m)); }
public void ModelTrackerCollection_ExistingCollection_AddRemoveModel_ContainsModel_ReturnsFalse() { var m = new TestModel(); Existing.Add(m); Existing.Remove(m); Assert.IsFalse(Existing.Contains(m)); }
public void ModelTrackerCollection_ExistingCollection_AddModel_IndexReturnsModel() { var m = new TestModel(); Existing.Add(m); Assert.IsNotNull(Existing[m.Id]); Assert.AreEqual(m, Existing[m.Id]); }
public void ModelTrackerCollection_ExistingCollection_AddRmoveModel_CountUnchanged() { var m = new TestModel(); var c = Existing.Count; Existing.Add(m); Existing.Remove(m); Assert.AreEqual(Existing.Count, c); }
public void ModelTrackerCollection_ExistingCollection_AddModel_CountIncreased() { var m = new TestModel(); int c = Existing.Count; Existing.Add(m); Assert.IsTrue(Existing.Count > c); }
public void ModelTrackerCollection_ExistingCollection_AddModel_IdAssigned() { var m = new TestModel(); var m2 = new TestModel(); m.Id = 1000000; Existing.Add(m); Existing.Add(m2); Assert.IsTrue(m.Id != 1000000); Assert.IsTrue(m2.Id != 1000000); Assert.IsTrue(m.Id != m2.Id); }