Ejemplo n.º 1
0
        public void ChangePassword()
        {
            // Arrange
            MembershipCreateStatus status;
            var membershipUser = _provider.CreateUser("martijn", "1234ABCD", "*****@*****.**", null, null, true, null, out status);

            // Act
            _provider.ChangePassword("martijn", "1234ABCD", "DCBA4321");
            var o    = -1;
            var user = _provider.FindUsersByName("martijn", 0, 0, out o);

            // Assert
            Assert.True(_provider.ValidateUser("martijn", "DCBA4321"));
        }
Ejemplo n.º 2
0
        public void ChangePassword()
        {
            using (var store = NewInMemoryStore())
            {
                // Arrange
                var provider = new RavenDBMembershipProvider();
                provider.DocumentStore = store;
                MembershipCreateStatus status;
                var membershipUser = provider.CreateUser("martijn", "1234ABCD", "*****@*****.**", null, null, true, null, out status);

                // Act
                provider.ChangePassword("martijn", "1234ABCD", "DCBA4321");
                Thread.Sleep(500);

                // Assert
                Assert.True(provider.ValidateUser("martijn", "DCBA4321"));
            }
        }