[BACK] Return to TestServlets.java CVS log [TXT] [DIR] Up to [XP_Developer] / xtc

Diff for /xtc/TestServlets.java between version 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 1999/09/09 16:29:07 version 1.1.1.2, 1999/09/09 16:30:15
Line 7 
Line 7 
 import junit.textui.*;  import junit.textui.*;
   
 public class TestServlets extends TestCase {  public class TestServlets extends TestCase {
           private static final String PORT_STRING = "8081";
   
 public TestServlets (String name) {  public TestServlets (String name) {
                                   
Line 57 
Line 57 
                                                   
                         public void run()                          public void run()
                         {                          {
                                 String[] args = new String[]{ "-p","8081" };                                  String[] args = new String[]{ "-p",PORT_STRING};
                                 System.out.println("Running webserver"                                  System.out.println("Running webserver"
                                         );                                          );
                                 // static method needs no tear-down                                  // static method needs no tear-down
Line 80 
Line 80 
         * Exercise the PageSaver          * Exercise the PageSaver
         * Send a request and check the response contains the expected String.          * Send a request and check the response contains the expected String.
         */          */
         public void testDisplaying()          public void testDisplayingAKnownString()
         {          {
   
                 try {                  try {
                           String result = "My known input";
                           PageSaver.save(result);
                                                   
                         String servletName = PageSaver.class.getName();                          String servletName = PageSaver.class.getName();
                         String actualResponse = getServerResponse("http://127.0.0.1:8081/servlet/"+servletName);                          String actualResponse = getServerResponse("http://127.0.0.1:"+PORT_STRING+"/servlet/"+servletName);
                         assert(actualResponse.equals("Empty"));                          assert(actualResponse.equals(result));
                 }                  }
                 catch (Exception exception) {                  catch (Exception exception) {
                         exception.printStackTrace();                          exception.printStackTrace();


Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2
https://casino-brain.com/