Ejemplo n.º 1
0
        public void AsMailAccount_GivenValidAccount_ShouldMapAllProperties()
        {
            // Arrange
            var accountEntity = new MailAccountEntityBuilder().AsValidObject().Build();

            // Act
            var account = accountEntity.AsMailAccount();

            // Assert
            Assert.IsNotNull(account);
            RnAssert.AreEqual(accountEntity, account);
        }
Ejemplo n.º 2
0
        public void AsMailAccount_GivenWasToldToSkipPasswordMapping_ShouldNotMapPassword()
        {
            // Arrange
            var accountEntity = new MailAccountEntityBuilder().AsValidObject().Build();

            // Act
            var account = accountEntity.AsMailAccount(false);

            // Assert
            Assert.IsNotNull(account);
            Assert.IsTrue(string.IsNullOrWhiteSpace(account.SmtpPassword));
        }
Ejemplo n.º 3
0
        public void AsMailAccount_GivenAccountWithRedirectToDiskEnabled_ShouldMapAllProperties()
        {
            // Arrange
            var accountEntity = new MailAccountEntityBuilder()
                                .AsValidObject()
                                .WithRedirectToDisk(true)
                                .Build();

            // Act
            var account = accountEntity.AsMailAccount();

            // Assert
            Assert.IsNotNull(account);
            RnAssert.AreEqual(accountEntity, account);
            Assert.IsTrue(account.RedirectToDisk);
        }