public void check_get_campaign_info_without_exception_case(String campaign, String infoCampaign) { PoolManager poolManager = new PoolManager(); String[] sCamp = campaign.Split(" "); String[] sInfoCampaign = infoCampaign.Split(" "); Campaign campaignTemp = new Campaign(sCamp[1], sCamp[2], Double.Parse(sCamp[3]), Double.Parse(sCamp[4]), Double.Parse(sCamp[5])); poolManager.getCampaigns().Add(campaignTemp); var exception = Record.Exception(() => campaignController.getCampaignInfo(sInfoCampaign, poolManager)); Assert.Null(exception); }
public void Run(String[] parameters, PoolManager poolManager) { Operation operation; if (!(Enum.TryParse(parameters[0].ToUpper(), true, out operation))) { UndefinedCommand(); } switch (operation) { case Operation.CREATE_PRODUCT: productController.createProduct(parameters, poolManager); break; case Operation.CREATE_CAMPAIGN: campaignController.createCampaign(parameters, poolManager); break; case Operation.CREATE_ORDER: orderController.createOrder(parameters, poolManager); break; case Operation.INCREASE_TIME: poolManager.GetTime().increaseTime(parameters, poolManager); break; case Operation.GET_PRODUCT_INFO: productController.getProductInfo(parameters, poolManager); break; case Operation.GET_CAMPAIGN_INFO: campaignController.getCampaignInfo(parameters, poolManager); break; case Operation.CANCEL_ORDER: orderController.cancelOrder(parameters, poolManager); break; } }