Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldLogFailedInitPasswordChange()
        public virtual void ShouldLogFailedInitPasswordChange()
        {
            assertException(() => _authentication.authenticate(AuthToken("neo4j", "123", "123")), typeof(AuthenticationException), "Old password and new password cannot be the same.");

            MultiRealmAuthManagerRule.FullSecurityLog fullLog = AuthManagerRule.getFullSecurityLog();
            fullLog.AssertHasLine("neo4j", "logged in (password change required)");
            fullLog.AssertHasLine("neo4j", "tried to change password: Old password and new password cannot be the same.");
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldLogInitPasswordChange() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldLogInitPasswordChange()
        {
            _authentication.authenticate(AuthToken("neo4j", "123", "secret"));

            MultiRealmAuthManagerRule.FullSecurityLog fullLog = AuthManagerRule.getFullSecurityLog();
            fullLog.AssertHasLine("neo4j", "logged in (password change required)");
            fullLog.AssertHasLine("neo4j", "changed password");
        }