コード例 #1
0
        public void CreateAndUpdateCampaign()
        {
            int      emailId   = 1;
            int      segmentId = 1;
            Campaign campaign  = _campaignClient.CreateCampaign(emailId, segmentId);

            Assert.IsNotNull(campaign);

            var originalEmail = campaign.elements[1];

            CampaignEmail email = new CampaignEmail
            {
                emailId         = 2,
                outputTerminals = originalEmail.outputTerminals,
                id   = originalEmail.id,
                type = "CampaignEmail"
            };

            campaign.elements[1] = email;

            var updatedCampaign = _campaignClient.UpdateCampaign(campaign);

            Assert.AreEqual(campaign.id, updatedCampaign.id);
        }