public void check_campaign_with_exception_cases(String param)
        {
            String[]           commandSplit       = param.Split(" ");
            ValidateParameters validateParameters = new ValidateParameters();

            Assert.Throws <Exception>(() => validateParameters.checkCampaign(commandSplit));
        }
        public void check_campaign_without_exception_cases(String param)
        {
            String[]           commandSplit       = param.Split(" ");
            ValidateParameters validateParameters = new ValidateParameters();
            var exception = Record.Exception(() => validateParameters.checkCampaign(commandSplit));

            Assert.Null(exception);
        }
Exemplo n.º 3
0
 public void createCampaign(string[] campaign, PoolManager poolManager)
 {
     if (Validate(campaign))
     {
         try
         {
             validateParameters.checkCampaign(campaign);
             isSavedProduct(campaign, poolManager);
             Run(campaign, poolManager);
         }
         catch (Exception e)
         {
             throw new Exception(e.Message, e);
         }
     }
     else
     {
         ErrorCampaignParameters();
     }
 }