Ejemplo n.º 1
0
        public static void AreEqual(MailApiKeyEntity source, MailApiKey target, bool checkPassword = true)
        {
            Assert.AreEqual(source.Id, target.Id);
            Assert.AreEqual(source.Enabled, target.Enabled);
            Assert.AreEqual(source.CreationDateUtc, target.CreationDateUtc);
            Assert.AreEqual(source.MailAccountId, target.MailAccountId);
            Assert.AreEqual(source.MailSendCount, target.MailSendCount);
            Assert.AreEqual(source.ApiKey, target.ApiKey);

            RnAssert.AreEqual(source.MailAccount, target.MailAccount, checkPassword);
        }
Ejemplo n.º 2
0
        public static MailApiKey AsMailApiKey(this MailApiKeyEntity source, bool mapPassword = true)
        {
            if (source == null)
            {
                return(null);
            }

            var mapped = new MailApiKey
            {
                MailAccount     = source.MailAccount.AsMailAccount(mapPassword),
                Enabled         = source.Enabled,
                Id              = source.Id,
                CreationDateUtc = source.CreationDateUtc,
                MailSendCount   = source.MailSendCount,
                MailAccountId   = source.MailAccountId,
                ApiKey          = source.ApiKey
            };

            return(mapped);
        }