예제 #1
0
        public async Task Login_GivenUserModelAndPassword_ReturnsFailedSignInResult()
        {
            // Arrange
            var ldapAuthenticationModeRepository = Substitute.For <ILdapAuthenticationModeRepository>();
            var userRepository = Substitute.For <IUserRepository>();

            var ldapConnectionService = new LdapConnectionService(ldapAuthenticationModeRepository, userRepository, mockedLdapConnectionClient, mockedLdapConnectionClient);

            // Act
            var signInResult = await ldapConnectionService.Login(mockUserModel, "Password1#");

            // Assert
            Assert.False(signInResult.Succeeded, "Testing an LDAP login for should return failed.");
        }