示例#1
0
    public void check_check_status_with_all_cases(String campaign)
    {
        String[] sCamp        = campaign.Split(" ");
        Campaign campaignTemp = new Campaign(sCamp[1], sCamp[2],
                                             Double.Parse(sCamp[3]), Double.Parse(sCamp[4]), Double.Parse(sCamp[5]));

        campaignTemp._campaignStatus = CampaignStatus.Active;
        campaignTemp._hourInCampaign = 10;
        campaignController.CheckStatus(campaignTemp);
        Assert.Equal(CampaignStatus.Ended, campaignTemp._campaignStatus);
        campaignTemp._campaignStatus = CampaignStatus.Active;
        campaignTemp._hourInCampaign = 0;
        campaignTemp._totalSales     = 100;
        campaignController.CheckStatus(campaignTemp);
        Assert.Equal(CampaignStatus.Ended, campaignTemp._campaignStatus);
    }