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

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

            Assert.Null(exception);
        }
Пример #3
0
 public void createProduct(string[] product, PoolManager poolManager)
 {
     if (Validate(product))
     {
         try
         {
             validateParameters.checkProduct(product);
             Run(product, poolManager);
         }
         catch (Exception e)
         {
             throw new Exception(e.Message, e);
         }
     }
     else
     {
         ErrorProductParameters();
     }
 }