public ActionResult RenderLeftMenu(int campaignId = 0)
        {
            CampaignClient campaignService = new CampaignClient();
            ACM.Model.PartialViewInfo partialView = new Model.PartialViewInfo();

            if (Session["CampaignId"] != null)
                partialView.CampaignId = (Int32)Session["CampaignId"];
            else
                partialView.CampaignId = campaignId;
            CampaignBO campaignBO = new CampaignBO();
            partialView = campaignBO.CampaignLeftNavigationDetails(partialView.CampaignId);

            if (Session["DeploymentPeriodId"] != null)
            {
                partialView.DeploymentPeriodId = (int)Session["DeploymentPeriodId"];
            }

            return PartialView("_LeftMenu", partialView);
        }
Beispiel #2
0
        public async Task should_return_expected_data()
        {
            // given
            var expectedResult = new[]
            {
                new Campaign
                {
                    Description = "test-desc",
                    Goal        = 324234,
                    Guid        = Guid.NewGuid(),
                    Name        = "some-name"
                }
            };

            _httpTest.RespondWithJson(expectedResult);
            var client = new CampaignClient();

            // when
            Campaign[] result = await client.ListCampaigns();

            // then
            result.ToExpectedObject().ShouldEqual(expectedResult);
        }
 public void Init()
 {
     _campaignClient = new CampaignClient("site", "user", "password", "https://secure.eloqua.com/API/REST/2.0/");
 }