Examples of ParamFileRepository


Examples of org.jboss.internal.soa.esb.parameters.ParamFileRepository

        if (runtimeClassName == null)
        {
          // If there's no repository name configured, return the
          // default file-based repository...
          instance = new ParamFileRepository();
        } else
        {
          try
          {
            Class<?> runtimeClass = ClassUtil.forName(runtimeClassName, ParamRepositoryFactory.class);
View Full Code Here

Examples of org.jboss.internal.soa.esb.parameters.ParamFileRepository

{

  public void test_ParamsFileRepository() throws Exception
  {
    File root;
    ParamFileRepository fileRepo;

    // Check it defaults to the working dir...
    root = new File("./");
    fileRepo = new ParamFileRepository();
    assertEquals(root, fileRepo.getRoot());

    // Check it can pick up from the System prop...
    root = new File("build/tests/");
    ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
        ParamFileRepository.FILE_PARAMS_REPOS_ROOT, root.getPath());
    fileRepo = new ParamFileRepository();
    assertEquals(root, fileRepo.getRoot());

    // Check for error on invalid System prop...
    ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
        ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "blah/blah");
    try
    {
      new ParamFileRepository();
      fail("expected IllegalStateException");
    } catch (IllegalStateException e)
    {
      // expected
    }
View Full Code Here

Examples of org.jboss.internal.soa.esb.parameters.ParamFileRepository

  public void test_add_get_remove_badargs() throws Exception
  {
    ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
        ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
    ParamFileRepository fileRepo = new ParamFileRepository();

    test_add_badargs(fileRepo, null, "val");
    test_add_badargs(fileRepo, "", "val");
    test_add_badargs(fileRepo, "", "val");
    test_add_badargs(fileRepo, "xxx/yyy", null);
View Full Code Here

Examples of org.jboss.internal.soa.esb.parameters.ParamFileRepository

  public void test_add_get_remove() throws Exception
  {
    ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
        ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
    ParamFileRepository fileRepo = new ParamFileRepository();
    String name = "repostests/jboss/testparam";

    // Make sure the parameter doesn't already exist...
    assertEquals(null, fileRepo.get(name));

    // Now the tests...
    assertEquals(null, fileRepo.get(name));
    fileRepo.add(name, "tomtestvalue");
    assertEquals("tomtestvalue", fileRepo.get(name));
    fileRepo.remove(name);
    assertEquals(null, fileRepo.get(name));
  }
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.