Package gov.nasa.jpf.autodoc.types

Examples of gov.nasa.jpf.autodoc.types.ConfigLoader


  public void testLoadConfig() throws Exception {
    System.out.println("method> loadConfig");
   
    String filepath = "config.properties";
   
    ConfigLoader cl = new ConfigLoader();
    cl.loadConfig(filepath);
    assertFalse(cl.isEmpty());
  }
View Full Code Here


  @Test
  public void testExpandTerms() throws Exception {
    System.out.println("method> expandTerms");
   
    String filepath = "config.properties";
    ConfigLoader cl = new ConfigLoader();
    cl.load(new FileInputStream(filepath));
   
    cl.expandTerms();
    cl.list(new PrintWriter(System.out, true));
  }
View Full Code Here

    System.out.println("method> isExpandable");
   
    String expression = "${expandable}";
    String badexpression = "$[nonexpandable}";
   
    ConfigLoader cl = new ConfigLoader();
    assertTrue(cl.isExpandable(expression));
    assertFalse(cl.isExpandable(badexpression));
  }
View Full Code Here

   */
  @Test
  public void testIsLeaf() throws Exception {
    System.out.println("method> isLeaf");
   
    ConfigLoader cl = new ConfigLoader();
    cl.setProperty("property", "value");
    cl.setProperty("property.isleaf", "true");
    cl.setProperty("noleaf", "value");
    cl.setProperty("noleaf.isleaf", "false");
    cl.setProperty("singleprop", "value");
   
    assertTrue(cl.isLeaf("property"));
    assertFalse(cl.isLeaf("noleaf"));
    assertFalse(cl.isLeaf("singleprop"));
  }
View Full Code Here

   
    String key = "PropertyListenerAdapter";
    String expType = "Listener";
    String filepath = "config.properties";
   
    ConfigLoader cl = new ConfigLoader();
    cl.load(new FileInputStream(filepath));
    assertEquals(expType, cl.getType(key));
  }
View Full Code Here

  public void testEqual() throws SAXException, IOException {
    System.out.println("> Automated XML comparison Test.");

    String test = "src/tests/gov/nasa/jpf/test/autodoc/types/output/";
    ConfigLoader cfg = new ConfigLoader();
    cfg.loadConfig("xml-test.properties");

    try {
      String[] prop = cfg.getPropertyVals("files");

      for (String file : prop) {
        File ref = new File(file);
        String reference = load(test + ref.getName());
        System.out.println("reference file: " + test + ref.getName());
View Full Code Here

TOP

Related Classes of gov.nasa.jpf.autodoc.types.ConfigLoader

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.