コード例 #1
0
 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());
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 public void TestMembersList_ContainsDefinedGroups()
 {
     _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView());
     Assert.AreEqual(21, _memberListView.Collection.Groups.Count);
 }
コード例 #4
0
 public void TestMembersList_CanBeInitializedWithNullFilter()
 {
     _memberListView = new MemberListViewModel("Default", _handler.Database, _dispatcher, new MemberCollectionView());
     Assert.AreEqual(85, _memberListView.AllItems.Count);
 }