Example #1
0
        public void WhenALegacyPasswordIsSet_ItIsHashedAsWeExpect()
        {
            // Arrange/Act
            var testUser     = ValidLegacyUser.AsUser();
            var expectedHash = PasswordHelper.EncodeLegacyPassword(ValidLegacyUser.Password);

            // Assert
            testUser.GetPasswordHash().Should().Be(expectedHash);
        }
 public MockLegacyRepository()
 {
     _users = new List <User>()
     {
         ValidLegacyUser.AsUser(),
             InvalidLegacyUser.AsUser()
     };
     SourceSystem = UserSource.Legacy;
 }
Example #3
0
        public void WhenInstantiated_PropertiesAreSetAsExpected()
        {
            // Arrange & Act
            var testUser = ValidLegacyUser.AsUser();

            // Assert
            testUser.FirstName.Should().Be(ValidLegacyUser.Firstname);
            testUser.LastName.Should().Be(ValidLegacyUser.Lastname);
            testUser.Username.Should().Be(ValidLegacyUser.Username);
            testUser.EmailAddress.Should().Be(ValidLegacyUser.EmailAddress);
            testUser.Source.Should().Be(ValidLegacyUser.Status);
            testUser.UserStatus.Should().Be(ValidLegacyUser.UserSource);
        }