Ejemplo n.º 1
0
        public void Next_ReturnsString()
        {
            EmailAddressSource source = new EmailAddressSource();
            String email = source.Next(null);

            Assert.NotNull(email);
        }
        public void Next_ReturnsString()
        {
            EmailAddressSource source = new EmailAddressSource();
            String             email  = source.Next(null);

            Assert.NotNull(email);
        }
Ejemplo n.º 3
0
 public EmailAddress(DataRow dataRow)
 {
     _recipientListId = (int)dataRow["fkRecipientListId"];
     _emailAddress = dataRow["EmailAddress"] != null ? dataRow["EmailAddress"].ToString() : null;
     _comment = dataRow["Comment"] != null ? dataRow["Comment"].ToString() : null;
     _added = dataRow["Added"] != null ? (DateTime)dataRow["Added"] : DateTime.MinValue;
     _source = dataRow["Source"] != null ? (EmailAddressSource)dataRow["Source"] : EmailAddressSource.Imported;
 }
Ejemplo n.º 4
0
        public void Next_ReturnsDifferentResults()
        {
            EmailAddressSource source = new EmailAddressSource();
            string emailOne = source.Next(null);
            string emailTwo = source.Next(null);

            Assert.AreNotEqual(emailOne, emailTwo);
        }
Ejemplo n.º 5
0
 public EmailAddress(DataRow dataRow)
 {
     _recipientListId = (int)dataRow["fkRecipientListId"];
     _emailAddress    = dataRow["EmailAddress"] != null ? dataRow["EmailAddress"].ToString() : null;
     _comment         = dataRow["Comment"] != null ? dataRow["Comment"].ToString() : null;
     _added           = dataRow["Added"] != null ? (DateTime)dataRow["Added"] : DateTime.MinValue;
     _source          = dataRow["Source"] != null ? (EmailAddressSource)dataRow["Source"] : EmailAddressSource.Imported;
 }
        public void Next_ReturnsDifferentResults()
        {
            EmailAddressSource source   = new EmailAddressSource();
            string             emailOne = source.Next(null);
            string             emailTwo = source.Next(null);

            Assert.AreNotEqual(emailOne, emailTwo);
        }
Ejemplo n.º 7
0
        public void RecipientListAddItem(int recipientListId, string emailAddress, string comment, EmailAddressSource source)
        {
            Database.Execute(() =>
                                 {
                                     DbCommand
                                         cmd = base.CreateCommand("NewsletterRecipientListAddItem");
                                     cmd.Parameters.Add(base.CreateParameter("recipientlistid", recipientListId));
                                     cmd.Parameters.Add(base.CreateParameter("emailAddress", emailAddress));
                                     cmd.Parameters.Add(base.CreateParameter("comment", comment));
                                     cmd.Parameters.Add(base.CreateParameter("source", source));

                                     cmd.ExecuteNonQuery();
                                 });
        }
Ejemplo n.º 8
0
        public GuestVerificationRequestEmailAddressGenerator()
        {
            _requestData = new List <object[]>();

            var emailAddresses = new EmailAddressSource();

            foreach (var emailAddress in emailAddresses)
            {
                var request = new object[] {
                    new GuestVerificationRequest
                    {
                        ProjectAccessCode = "9F4AC529-8860-42CB-ACFB-722BB668BC06",     // needs to be a constant access code value
                        ProjectId         = Guid.NewGuid(),
                        Username          = emailAddress.ToString()
                    }
                };

                _requestData.Add(request);
            }
        }
Ejemplo n.º 9
0
        public void RecipientListAddItem(int recipientListId, string emailAddress, string comment, EmailAddressSource source)
        {
            Executor.Execute(() =>
            {
                DbCommand
                cmd = base.CreateCommand("NewsletterRecipientListAddItem");
                cmd.Parameters.Add(base.CreateParameter("recipientlistid", recipientListId));
                cmd.Parameters.Add(base.CreateParameter("emailAddress", emailAddress));
                cmd.Parameters.Add(base.CreateParameter("comment", comment));
                cmd.Parameters.Add(base.CreateParameter("source", source));

                cmd.ExecuteNonQuery();
            });
        }