public void RatioNegativeTest_NoInput() { var modalErrorPattern = "No values were entered. Please enter any three values. The remaining value will be calculated."; var data = new DodoWareData(); var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void DiscountNegativeTests_NoInput() { var modalErrorPattern = "The input 'Base Price' is required."; var data = new DodoWareData(); var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void DiscountNegativeTests_BasePrice() { var modalErrorPattern = "The input 'Sales Tax Percent' is required."; var data = new DodoWareData { { "BasePrice", "123.45" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void DiscountNegativeTests_BasePriceAndSalesTaxPercent() { var modalErrorPattern = "No numbers from Section B were entered. Please enter any one number in Section B. The other two will be calculated."; var data = new DodoWareData { { "BasePrice", "50" }, { "SalesTaxPercent", "4" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void RatioNegativeTest_DivideByZero1A() { var modalErrorPattern = "If D is unset, then A must not be zero."; var data = new DodoWareData { { "A", "0" }, { "B", "33.44" }, { "C", "44.44" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void RatioNegativeTest_OneInvalidInput() { foreach (var id in IdArray) { var modalErrorPattern = $"The value 'X' for input '{id}' could not be converted to a decimal number."; var data = new DodoWareData { { id, "X" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } }
public void RatioNegativeTest_DivideByZero1D() { var modalErrorPattern = "The value of input 'D' may not be zero."; var data = new DodoWareData { { "A", "0.1102" }, { "C", "44.44" }, { "D", "0" }, }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void PercentNegativeTest_DivideByZero1A() { var modalErrorPattern = "The number A may not be zero in this scenario."; var data = new DodoWareData { { "ScenarioId", "1" }, { "A", "0" }, { "C", "7" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void RatioNegativeTest_FourValidInputs() { var modalErrorPattern = "All four values were entered. Please enter any three values. The remaining value will be calculated."; var data = new DodoWareData { { "A", "101.101" }, { "B", "202.202" }, { "C", "303.303" }, { "D", "404.404" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void FractionNegativeTest_NoInput() { var modalErrorPattern = "The first entry must have a whole number, a fraction, or both."; foreach (var operation in OperationArray) { var data = new DodoWareData { { "Operation", operation } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } }
public void RatioNegativeTest_OneValidInput() { var modalErrorPattern = "Only one value was entered. Please enter any three values. The remaining value will be calculated."; foreach (var id in IdArray) { Console.WriteLine($"id={id}"); var data = new DodoWareData { { id, "2" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } }
public void DiscountNegativeTests_TwoFromSectionB() { var modalErrorPattern = "Two numbers from Section B were entered. Please enter any one number in Section B. The other two will be calculated."; var data = new DodoWareData { { "BasePrice", "0.75" }, { "SalesTaxPercent", "12.2" }, { "DiscountPercent", "30" }, { "FinalPrice", "1.00" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void PercentNegativeTest_NoInput() { var modalErrorPattern = "No values were entered. Please enter any two values. The remaining value will be calculated."; foreach (var scenario in ScenarioArray) { Console.WriteLine($"scenario={scenario}"); var data = new DodoWareData { { "ScenarioId", scenario } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } }
public void DiscountNegativeTests_NonNumericDiscountPercent() { var modalErrorPattern = "The value 'XXX' for input 'Discount Percent' could not be converted to a decimal number."; var data = new DodoWareData { { "BasePrice", "100" }, { "SalesTaxPercent", "5" }, { "DiscountPercent", "XXX" }, { "DiscountedPrice", "90" }, }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void DiscountNegativeTests_NonNumericBasePrice() { var modalErrorPattern = "The value 'ASDF' for input 'Base Price' could not be converted to a decimal number."; var data = new DodoWareData { { "BasePrice", "ASDF" }, { "SalesTaxPercent", "5" }, { "DiscountedPrice", "90" }, { "FinalPrice", "94.5" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); }
public void PercentNegativeTest_ThreeValidInputs() { var modalErrorPattern = "All three values were entered. Please enter any two values. The remaining value will be calculated."; foreach (var scenario in ScenarioArray) { Console.WriteLine($"scenario={scenario}"); var data = new DodoWareData { { "ScenarioId", scenario }, { "A", "11.11" }, { "B", "22.22" }, { "C", "33.33" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } }
public void RatioNegativeTest_TwoValidInputs() { var modalErrorPattern = "Only two values were entered. Please enter any three values. The remaining value will be calculated."; for (var i = 0; i < 4; i++) { for (var j = i + 1; j < 4; j++) { var data = new DodoWareData { { IdArray[i], "77" }, { IdArray[j], "5" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } } }
public void PercentNegativeTest_OneInvalidInput() { foreach (var scenario in ScenarioArray) { foreach (var id in IdArray) { var modalErrorPattern = $"The value 'X' for input '{id}' could not be converted to a decimal number."; Console.WriteLine($"scenario={scenario} id={id}"); var data = new DodoWareData { { "ScenarioId", scenario }, { id, "X" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } } }
public void PercentNegativeTest_OneValidInput() { var modalErrorPattern = "Only one value was entered. Please enter any two values. The remaining value will be calculated."; foreach (var scenario in ScenarioArray) { foreach (var id in IdArray) { Console.WriteLine($"scenario={scenario} id={id}"); var data = new DodoWareData { { "ScenarioId", scenario }, { id, "111.111" } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } } }
public void FractionNegativeTest_NonIntegerValues() { var modalErrorPattern = "The value '1.1' for input '.*' could not be converted to a whole number."; foreach (var operation in OperationArray) { for (var i = 0; i < 6; i++) { var data = new DodoWareData { { "Operation", operation }, { "WholeNumber1", (i == 0 ? "1.1" : "1") }, { "Numerator1", (i == 1 ? "1.1" : "1") }, { "Denominator1", (i == 2 ? "1.1" : "1") }, { "WholeNumber2", (i == 3 ? "1.1" : "1") }, { "Numerator2", (i == 4 ? "1.1" : "1") }, { "Denominator2", (i == 5 ? "1.1" : "1") } }; var postNegativeTest = new PostNegativeTest(Resource, data, modalErrorPattern); postNegativeTest.Go(); } } }