public void ShouldAddItemWhenNotInCollection() { var addedItem = new LocalTestResource(1, 10) { Name = "TestResource" }; _dataSource.Create(addedItem); Assert.IsTrue(_observableUnderTest.Contains(addedItem)); }
public void ShouldReplaceItemOnNewLocationWhenDifferentInstances() { _observableUnderTest.OrderBy(ltr => ltr.Name).Asc(); _dateSource.Create(_smallest); _dateSource.Create(_bigger); _dateSource.Create(_biggest); var newBiggest = new LocalTestResource(2) { Name = "Aaron" }; _dateSource.Update(newBiggest); Assert.IsFalse(_observableUnderTest.Contains(_biggest)); Assert.AreEqual(newBiggest, _observableUnderTest[0]); }