Ejemplo n.º 1
0
        public void GetMemberActivity_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);

            ListResult lists = mc.GetLists();

            Assert.IsNotNull(lists.Data);
            Assert.IsTrue(lists.Data.Any());

            MembersResult members = mc.GetAllMembersForList(lists.Data[0].Id);

            Assert.IsNotNull(members.Data);
            Assert.IsTrue(members.Data.Any());

            List <EmailParameter> memberEmails = new List <EmailParameter>();

            foreach (MemberInfo member in members.Data)
            {
                memberEmails.Add(new EmailParameter()
                {
                    Email = member.Email
                });
            }

            //  Act
            MemberActivityResult results = mc.GetMemberActivity(lists.Data[0].Id, memberEmails);

            //  Assert
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Data.Any());
        }
Ejemplo n.º 2
0
        public void GetMemberActivity_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
            
            ListResult lists = mc.GetLists();
            Assert.IsNotNull(lists.Data);
            Assert.IsTrue(lists.Data.Any());

            MembersResult members = mc.GetAllMembersForList(lists.Data[0].Id);
            Assert.IsNotNull(members.Data);
            Assert.IsTrue(members.Data.Any());

            List<EmailParameter> memberEmails = new List<EmailParameter>();

            foreach (MemberInfo member in members.Data)
            {
                memberEmails.Add(new EmailParameter() { Email = member.Email });
            }

            //  Act
            MemberActivityResult results = mc.GetMemberActivity(lists.Data[0].Id, memberEmails);

            //  Assert
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Data.Any());
        }