Exemple #1
0
        public void AsMailUser_GivenWasToldToSkipPasswordMapping_ShouldNotMapPassword()
        {
            // Arrange
            var userEntity = new MailUserEntityBuilder().AsValidObject().Build();

            // Act
            var user = userEntity.AsMailUser(false);

            // Assert
            Assert.IsNotNull(user);
            Assert.IsTrue(string.IsNullOrWhiteSpace(user.Password));
        }
Exemple #2
0
        public void AsMailUser_GivenValidMailUserEntity_ShouldMapAllFields()
        {
            // Arrange
            var userEntity = new MailUserEntityBuilder().AsValidObject().Build();

            // Act
            var user = userEntity.AsMailUser();

            // Assert
            Assert.IsNotNull(user);
            RnAssert.AreEqual(userEntity, user);
        }