# PrintTest

### Summary

The javax.servlet.jsp.JspWriter interface emulates some of the functionality found in java.io.Writer,java.io.BufferedWriter and java.io.PrintWriter, however it differs in throwing the java.io.IOException from the print methods.

### Positive Tests

positivePrintBoolean Test: Call the method in the jsp page

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintBoolean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintChar Test: Call the method print(char c) in thu jsp page

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintChar -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintCharArray Test: Call the method print(char[] c) in the jsp page

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintCharArray -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintDouble Test: Call the method print(double d) in the jsp page

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintDouble -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintFloat Test: Call the method print(float f) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintFloat -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintInt Test: Call the method print(int i) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintInt -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintLong Test: Call the method print(long l) in JSP page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintLong -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintObj Test: Create an Object (say an Integer object) and pass to the method print(java.lang.Object obj).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintStr Test: Create a String object and call the method, print(java.lang.String str).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintStr -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintln Test: Call the method println() after calling print method for one (or more) times and then call the print method.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintln -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnBoolean Test: Declare a boolean value and Call the method println(boolean b) in jsp page and check for line.seperator at client end.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnBoolean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnChar Test: Declare a char variable and call the method println(char c) , in thu jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnChar -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnCharArray Test: Declare a char array and then call the method println(char[] c).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnCharArray -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnDouble Test: Declare a double variable and then call the method println(double d)

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnDouble -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnFloat Test: Declare a float variable and then call the method println(float f) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnFloat -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnInt Test: Declare an int variable and then call the method println(int i) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnInt -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnLong Test: Declare a long variable and then call the method println(long l) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnLong -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnObj Test: Declare an Object variable and then call the method println(java.lang.Object obj) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintlnStr Test: Declare a String variable and then call the method println(java.lang.String str) in the jsp page.

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintlnStr -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintDoubleMaxBound Test: We are declaring a double variable and set maximum value using Double.MAX_VALUE, Try to print using print(double d).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintDoubleMaxBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintDoubleMinBound Test: We are declaring a double variable and set minimum value using Double.MIN_VALUE, Try to print using print(double d).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintDoubleMinBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintFloatMaxBound Test: We are declaring a float variable and set maximum value using Float using Float.MAX_VALUE,Try to print using print(float f).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintFloatMaxBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintFloatMinBound Test: We are declaring a float variable and set minimum value using Float using Float.MIN_VALUE,Try to print using print(float f).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintFloatMinBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintIntMaxBound Test: We are declaring a int variable and set maximum value using Integer.MAX_VALUE, Try to print using print().

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintIntMaxBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintIntMinBound Test: We are declaring a int variable and set minimum value using Integer.MIN_VALUE, Try to print using print().

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintIntMinBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintLongMaxBound Test: We are declaring a long variable and set maximum value using Long.MAX_VALUE, Try to print using print(long l).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintLongMaxBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positivePrintLongMinBound Test: We are declaring a long variable and set minimum value using Long.MIN_VALUE, Try to print using print(long l).

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID positivePrintLongMinBound -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

### Negative Tests

negativePrintBoolean Test: Declare a boolean variable in the JSP page.Then call the close method. Now call the method print(boolean b).This should result in IOException. If 'out' is closed response stream wont be there to get our result. So the jsp writes the output to a file following a naming convention. We read that and check if the test passed

title | PrintTest
source | PrintTest.java
executeClass | engine.JspWriter.print.PrintTest
executeArgs | -TestCaseID negativePrintBoolean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI