# WriteTest

### 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

positiveWriteCharArray1 Test: Declare an character array variable and then call the method write(char[] c) in the jsp page.

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteCharArray1 -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveWriteCharArray2 Test: Declare an character array variable and then call the method write(char[] c,off,len) in the jsp page.

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteCharArray2 -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

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

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteInt -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

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

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteStr -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveWriteStrOffset Test: Declare a String variable and then call the method write(java.lang.String str,offset of,length len) in the jsp page.

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteStrOffset -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveWriteIntExt Test: We are declaring an variable and assigning it to a value between 128 and 255.When write(int i) method is called then it should print the ASCII Character

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteIntExt -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveWriteIntMaxValue Test: We are declaring an integer value using Integer.MAX_VALUE and use write() method to print it.

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteIntMaxValue -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveWriteIntLowBit Test: Call the method write(int i) in a JSP page and pass the integer ,where the upper two bytes are non-zero and lower two bytes constitute a valid ASCII character,as an argument.Character corresponding to the value of lower two bytes.

title | WriteTest
source | WriteTest.java
executeClass | engine.JspWriter.write.WriteTest
executeArgs | -TestCaseID positiveWriteIntLowBit -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI