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