示例#1
0
        public void GetAllUsersShouldReturnAllUsers()
        {
            // Arrange
            CreateUsersInDocumentStore(RavenDBMembershipProvider.DocumentStore, 5);

            // Act
            int totalRecords;
            var membershipUsers = _provider.GetAllUsers(0, 10, out totalRecords);

            // Assert
            Assert.AreEqual(5, totalRecords);
            Assert.AreEqual(5, membershipUsers.Count);
        }
示例#2
0
        public void FindUsersWithPaging()
        {
            using (var store = NewInMemoryStore())
            {
                // Arrange
                CreateUsersInDocumentStore(store, 10);
                var provider = new RavenDBMembershipProvider();
                provider.DocumentStore = store;

                // Act
                Thread.Sleep(500);
                int totalRecords;
                var membershipUsers = provider.GetAllUsers(0, 5, out totalRecords);

                // Assert
                Assert.Equal(10, totalRecords);                 // All users should be returned
                Assert.Equal(5, membershipUsers.Count);
            }
        }
示例#3
0
        public void GetAllUsersShouldReturnAllUsers()
        {
            using (var store = NewInMemoryStore())
            {
                // Arrange
                CreateUsersInDocumentStore(store, 5);
                var provider = new RavenDBMembershipProvider();
                provider.DocumentStore = store;

                // Act
                Thread.Sleep(500);
                int totalRecords;
                var membershipUsers = provider.GetAllUsers(0, 10, out totalRecords);

                // Assert
                Assert.Equal(5, totalRecords);
                Assert.Equal(5, membershipUsers.Count);
            }
        }
示例#4
0
        public MembershipUserCollection GetAllUsers()
        {
            int totalRecords;

            return(_provider.GetAllUsers(0, 1000, out totalRecords));
        }