示例#1
0
    public void check_get_campaign_with_null_cases(String campaign, String product, String dummyCampaignName)
    {
        PoolManager poolManager = new PoolManager();

        String[] sCamp        = campaign.Split(" ");
        String[] sPro         = product.Split(" ");
        Campaign campaignTemp = new Campaign(sCamp[1], sCamp[2],
                                             Double.Parse(sCamp[3]), Double.Parse(sCamp[4]), Double.Parse(sCamp[5]));
        Product productTemp = new Product(sPro[1], Double.Parse(sPro[2]), Double.Parse(sPro[3]), false);

        poolManager.getProducts().Add(productTemp);
        poolManager.getCampaigns().Add(campaignTemp);
        Assert.Null(campaignController.getCampaign(dummyCampaignName, poolManager));
    }