public void TestMembersList_ContainsMembersFilteredByString() { _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView()); _memberListView.FilterString = "miles"; Assert.AreEqual(2, _memberListView.Collection.Groups.Count); Assert.AreEqual(2, CountMembersInGroups()); }
public void TestMembersList_ContainsCustomFilteredMembers() { Predicate<MemberViewModel> nameFilter = delegate(MemberViewModel member) { return member.DisplayName.Contains("Miles"); }; _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView(nameFilter)); Assert.AreEqual(2, _memberListView.Collection.Groups.Count); Assert.AreEqual(2, CountMembersInGroups()); }
public void TestMembersList_ContainsDefinedGroups() { _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView()); Assert.AreEqual(21, _memberListView.Collection.Groups.Count); }
public void TestMembersList_CanBeInitializedWithNullFilter() { _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView()); Assert.AreEqual(85, _memberListView.AllItems.Count); }