Пример #1
0
        public void GetProfile_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);

            //  Act
            UserProfile details = mc.GetUserProfile();

            //  Assert
            Assert.IsFalse(string.IsNullOrEmpty(details.AccountName));
        }
Пример #2
0
        public void GetProfile_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);

            //  Act
            UserProfile details = mc.GetUserProfile();

            //  Assert
            Assert.IsFalse(string.IsNullOrEmpty(details.AccountName));
        }
        public MailChimpAccount GetMailChimpAccount()
        {
            var session   = getSession();
            var rest_info = getMetaData();
            var api_key   = session + "-" + rest_info.dc;

            MailChimpManager mc          = new MailChimpManager(api_key);
            UserProfile      userProfile = mc.GetUserProfile();

            return(new MailChimpAccount()
            {
                AccountName = userProfile.Name,
                ApiKey = api_key,
                Enabled = true,
                ConnectingDate = DateTime.UtcNow
            });
        }