Package org.jnetpcap.util.config

Examples of org.jnetpcap.util.config.ConfigString.reset()


    ConfigString string = new ConfigString("before @{a.b} after", variables, properties);
    assertTrue("sub failed in expand", string
        .expand("mark", properties));
    assertEquals("before A.B after", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test two properties.
   */
 
View Full Code Here


        new ConfigString("before @{a.b} after @{a.b.c}", variables, properties);
    assertTrue("sub failed in expand", string
        .expand("mark", properties));
    assertEquals("before A.B after A.B.C", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test two same properties.
   */
 
View Full Code Here

    ConfigString string = new ConfigString("before @{a.b} after @{a.b}", variables, properties);
    assertTrue("sub failed in expand", string
        .expand("mark", properties));
    assertEquals("before A.B after A.B", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test one name and two properties.
   */
 
View Full Code Here

        new ConfigString("before @{a.b} ${name} @{a.b.c}", variables, properties);
    assertTrue("sub failed in expand", string
        .expand("mark", properties));
    assertEquals("before A.B mark A.B.C", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test name within a property.
   */
 
View Full Code Here

  public void testNameWithinAProperty() {
    ConfigString string = new ConfigString("@{a.${name}.c}", variables, properties);
    assertTrue("sub failed in expand", string.expand("b", properties));
    assertEquals("A.B.C", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test suffix variable within a property.
   */
 
View Full Code Here

    ConfigString string = new ConfigString("@{a.${name}${suffix}}", variables, properties);
    assertTrue("sub failed in expand", string.expand("b", variables,
        properties));
    assertEquals("A.B.gotcha", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test recursive properties.
   */
 
View Full Code Here

    ConfigString string = new ConfigString("@{a.a}", variables, properties);
    assertTrue("sub failed in expand", string.expand("", variables,
        properties));
    assertEquals("c.c", string.toString());

    string.reset(); // Reintialize
  }
 
  /**
   * Test recursive variables.
   */
 
View Full Code Here

    ConfigString string = new ConfigString("${A.A}", variables, properties);
    assertTrue("sub failed in expand", string.expand("", variables,
        properties));
    assertEquals("C.C", string.toString());

    string.reset(); // Reintialize
  }

  /**
   * Test quotes.
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.