Package KFM.GUI

Examples of KFM.GUI.HttpParams


  public void testConstructor1()
  {
    // according to rfc1738 this is a valid URL
    String tURLString = "http://host/path";
    new HttpParams(tURLString);
  }
View Full Code Here


  public void testConstructor2()
  {
    // according to rfc1738 this is a valid URL
    String tURLString = "http://host/path?";
    new HttpParams(tURLString);
  }
View Full Code Here

  public void testConstructor3()
  {
    // we allow anchors in the URL
    String tURLString = "http://host/path#anchor";
    new HttpParams(tURLString);
  }
View Full Code Here

  public void testConstructor4()
  {
    // we allow anchors in the URL
    String tURLString = "http://host/path?a=b&c=d#anchor";
    new HttpParams(tURLString);
  }
View Full Code Here

    new HttpParams(tURLString);
  }


  public void testAddParam() {
    HttpParams httpparams = new HttpParams();
    String aName1=  "a";
    String aValue2=  "b";
    httpparams.addParam(aName1, aValue2);
    assertTrue("addParam did not addParam('a', 'b')", httpparams.getParam(aName1).equals(aValue2));
  }
View Full Code Here

    String aValue2=  "b";
    httpparams.addParam(aName1, aValue2);
    assertTrue("addParam did not addParam('a', 'b')", httpparams.getParam(aName1).equals(aValue2));
  }
  public void testAddParam2() {
    HttpParams httpparams = new HttpParams("http://www.siemens.com/pfad/zum/servlet/SieMap?a=b&c=d");
    String aName1=  "a";
    String aValue2=  "e";
    httpparams.addParam(aName1, aValue2);
    assertTrue("addParam did not addParam('a', 'b') to existing key 'a'", httpparams.getParameterValues(aName1).length == 2);
  }
View Full Code Here

    httpparams.addParam(aName1, aValue2);
    assertTrue("addParam did not addParam('a', 'b') to existing key 'a'", httpparams.getParameterValues(aName1).length == 2);
  }

  public void testGetParam() {
    HttpParams httpparams = new HttpParams();
    String aName1=  "a";
    String stringRet = httpparams.getParam(aName1);
    assertTrue("getParam() with not existing key returned " + stringRet, stringRet.equals(""));
  }
View Full Code Here

    String aName1=  "a";
    String stringRet = httpparams.getParam(aName1);
    assertTrue("getParam() with not existing key returned " + stringRet, stringRet.equals(""));
  }
  public void testGetParam2() {
    HttpParams httpparams = new HttpParams();
    String aName1=  "";
    String stringRet = httpparams.getParam(aName1);
    assertTrue("getParam() with empty key returned " + stringRet, stringRet.equals(""));
  }
View Full Code Here

    String aName1=  "";
    String stringRet = httpparams.getParam(aName1);
    assertTrue("getParam() with empty key returned " + stringRet, stringRet.equals(""));
  }
  public void testGetParam3() {
    HttpParams httpparams = new HttpParams();
    String aName1=  null;
    try {
        String stringRet = httpparams.getParam(aName1);
        fail("getParam() with null key did not throw a NullPointerException");
    }
    catch (NullPointerException e) {
    }
  }
View Full Code Here

    }
    catch (NullPointerException e) {
    }
  }
  public void testGetParam4() {
    HttpParams httpparams = new HttpParams("http://www.siemens.com/pfad/zum/servlet/SieMap?a=b&c=&d=e");
    String aName1= "c";
    assertTrue("", httpparams.getParam(aName1).equals(""));
  }
View Full Code Here

TOP

Related Classes of KFM.GUI.HttpParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.