Methods Summary |
---|
public void | beginVerifyInvalidOperandOneParameter(org.apache.cactus.WebRequest req)
req.addParameter(CalculatorServlet.OPERAND_ONE, "INVALID");
req.addParameter(CalculatorServlet.OPERAND_TWO, "22");
req.addParameter(CalculatorServlet.OPERATION, "+");
|
public void | beginVerifyInvalidOperandTwoParameter(org.apache.cactus.WebRequest req)
req.addParameter(CalculatorServlet.OPERAND_ONE, "22");
req.addParameter(CalculatorServlet.OPERAND_TWO, "INVALID");
req.addParameter(CalculatorServlet.OPERATION, "+");
|
public void | beginVerifyInvalidOperatorParameter(org.apache.cactus.WebRequest req)
req.addParameter(CalculatorServlet.OPERAND_ONE, "13");
req.addParameter(CalculatorServlet.OPERAND_TWO, "22");
req.addParameter(CalculatorServlet.OPERATION, "%");
|
public void | beginVerifyValidAdditionRequestParameters(org.apache.cactus.WebRequest req)
req.addParameter(CalculatorServlet.OPERAND_ONE, "4");
req.addParameter(CalculatorServlet.OPERAND_TWO, "60");
req.addParameter(CalculatorServlet.OPERATION, "+");
|
public void | beginVerifyValidSubtractionRequestParameters(org.apache.cactus.WebRequest req)
req.addParameter(CalculatorServlet.OPERAND_ONE, "45");
req.addParameter(CalculatorServlet.OPERAND_TWO, "22");
req.addParameter(CalculatorServlet.OPERATION, "-");
|
public void | testVerifyInvalidOperandOneParameter()
CalculatorServlet servlet = new CalculatorServlet();
try {
servlet.verifyRequestParameters(this.request);
fail("Calculator Exception should have been caught because " +
"operand one was invalid.");
} catch (ServletException e) {
}
|
public void | testVerifyInvalidOperandTwoParameter()
CalculatorServlet servlet = new CalculatorServlet();
try {
servlet.verifyRequestParameters(this.request);
fail("Calculator Exception should have been caught because " +
"operand two was invalid.");
} catch (ServletException e) {
}
|
public void | testVerifyInvalidOperatorParameter()
CalculatorServlet servlet = new CalculatorServlet();
try {
servlet.verifyRequestParameters(this.request);
fail("Calculator Exception should have been caught because " +
"operator was invalid.");
} catch (ServletException e) {
}
|
public void | testVerifyValidAdditionRequestParameters()
CalculatorServlet servlet = new CalculatorServlet();
servlet.verifyRequestParameters(this.request);
|
public void | testVerifyValidSubtractionRequestParameters()
CalculatorServlet servlet = new CalculatorServlet();
servlet.verifyRequestParameters(this.request);
|