Package org.dtk.util

Examples of org.dtk.util.FileServer


   * contained within app.
   * @throws Exception
   */
  @Test
  public void test_AnalyseWebApplicationWithNoCustomModules() throws Exception {
    FileServer fs = FileServer.spawn(testPort, "sample_apps/amd/local_dtk_with_only_dtk_reqs");   
   
    HttpResponse response = generateHTMLFormPost("url", validWebAddress);   
    assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode())
   
    Map<String, Object> jsonResponse = extractJsonFromHTMLEncodedResponse(response);
   
    compareUnsortedModuleLists(Arrays.asList("dojo.parser", "dijit.form.Button", "dojox.grid.EnhancedGrid"),
      (List<String>) jsonResponse.get("requiredDojoModules"));
    assertEquals(Collections.EMPTY_LIST, (List<String>) jsonResponse.get("availableModules"));   
    assertEquals(Collections.EMPTY_LIST, (List) jsonResponse.get("packages"));
   
    fs.stop();       
  }
View Full Code Here


   
    fs.stop();       
  }
 
  public void testAnalyseWebApplicationFromDirectory(String directoryPath) throws Exception {
    FileServer fs = FileServer.spawn(testPort, directoryPath);   
   
    HttpResponse response = generateHTMLFormPost("url", validWebAddress);   
    assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode())
    verifyWebApplicationDependencies(response);
   
    fs.stop();
 
View Full Code Here

   * and response body contains an empty module list.
   * @throws Exception
   */
  @Test
  public void test_AnalyseWebApplicationWithNoDependencies() throws Exception {
    FileServer fs = FileServer.spawn(testPort, "sample_pages/amd/local_with_no_deps");   
   
    HttpResponse response = generateHTMLFormPost("url", validWebAddress);   
    assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode())
   
    Map<String, Object> jsonResponse = extractJsonFromHTMLEncodedResponse(response);
   
    assertEquals(Collections.EMPTY_LIST, (List<String>) jsonResponse.get("requiredDojoModules"));
    assertEquals(Collections.EMPTY_LIST, (List<String>) jsonResponse.get("availableModules"));
   
    fs.stop();
  }
View Full Code Here

TOP

Related Classes of org.dtk.util.FileServer

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.