public void Where_FilterContainsAConstant_CorrectlyFiltered() { Person person = new Person("Ninja", 20); ReadOnlyContinuousCollection<Person> peopleMatchingAge = person.GetPeopleWithSameAge(_source); Assert.AreEqual(1, peopleMatchingAge.Count); }
public void Where_FilterContainsAConstant_CorrectlyFiltered() { Person person = new Person("Ninja", 20); ReadOnlyContinuousCollection <Person> peopleMatchingAge = person.GetPeopleWithSameAge(_source); Assert.AreEqual(1, peopleMatchingAge.Count); }
public void Where_FilterContainsAConstantWithPropertyChangingOnConstant_CorrectResultsReturned() { Person person = new Person("Ninja", 20); ReadOnlyContinuousCollection<Person> peopleMatchingAge = person.GetPeopleWithSameAge(_source); int callCount = 0; peopleMatchingAge.CollectionChanged += (sender, args) => callCount++; person.Age = 10; Assert.AreEqual(2, callCount); // one remove and one add Assert.AreEqual(1, peopleMatchingAge.Count); }
public void Where_FilterContainsAConstantWithPropertyChangingOnConstant_CorrectResultsReturned() { Person person = new Person("Ninja", 20); ReadOnlyContinuousCollection <Person> peopleMatchingAge = person.GetPeopleWithSameAge(_source); int callCount = 0; peopleMatchingAge.CollectionChanged += (sender, args) => callCount++; person.Age = 10; Assert.AreEqual(2, callCount); // one remove and one add Assert.AreEqual(1, peopleMatchingAge.Count); }