예제 #1
0
        public void SelectProfile_ReturnsAllUsers()
        {
            var qdict = new QueryableReliableIndexedDictionary <UserName, Basic.Common.UserProfile, Basic.Common.UserProfile>(indexed_users, userDictionaryManager);
            var query = qdict.Select(x => x);

            ISet <Basic.Common.UserProfile> profiles = new SortedSet <Basic.Common.UserProfile>();

            // Execute the queries, add breakpoints here to see results
            foreach (Basic.Common.UserProfile profile in query)
            {
                profiles.Add(profile);
            }

            Assert.IsTrue(profiles.Contains(user0));
            Assert.IsTrue(profiles.Contains(user1));
            Assert.IsTrue(profiles.Contains(user2));
            Assert.IsTrue(profiles.Contains(user3));
            Assert.IsTrue(profiles.Contains(user4));
        }
예제 #2
0
        public void SelectProfileEmails_ReturnsAllUsersEmails()
        {
            var qdict = new QueryableReliableIndexedDictionary <UserName, Basic.Common.UserProfile, Basic.Common.UserProfile>(indexed_users, userDictionaryManager);

            var query = qdict.Select(x => x.Email);

            ISet <string> emails = new SortedSet <string>();

            // Execute the queries, add breakpoints here to see results
            foreach (var email in query)
            {
                emails.Add(email);
            }

            Assert.IsTrue(emails.Contains("*****@*****.**"));
            Assert.IsTrue(emails.Contains("*****@*****.**"));
            Assert.IsTrue(emails.Contains("*****@*****.**"));
            Assert.IsTrue(emails.Contains("*****@*****.**"));
            Assert.IsTrue(emails.Contains("*****@*****.**"));
        }