Package org.apache.wicket.core.util.file

Examples of org.apache.wicket.core.util.file.WebApplicationPath.find()


      if (null != propertiesFolder)
      {
        WebApplicationPath webPath = new WebApplicationPath(servletContext);
        webPath.add(propertiesFolder);
        IResourceStream stream = webPath.find(Initializer.class, velocityPropertiesFile);
        InputStream is = null;
        try
        {
          is = stream.getInputStream();
          Properties props = new Properties();
View Full Code Here


    ServletContext context = Mockito.mock(ServletContext.class);
    Mockito.when(context.getResource(Mockito.any(String.class))).thenReturn(webUrl);

    WebApplicationPath path = new WebApplicationPath(context);
    IResourceStream resourceStream = path.find(String.class, "WEB-INF/web.xml");
    assertNull(resourceStream);

    IResourceStream otherResourceStream = path.find(String.class, "any/other/resource");
    assertNotNull(otherResourceStream);
View Full Code Here

    WebApplicationPath path = new WebApplicationPath(context);
    IResourceStream resourceStream = path.find(String.class, "WEB-INF/web.xml");
    assertNull(resourceStream);

    IResourceStream otherResourceStream = path.find(String.class, "any/other/resource");
    assertNotNull(otherResourceStream);

  }
}
View Full Code Here

      if (null != propertiesFolder)
      {
        WebApplicationPath webPath = new WebApplicationPath(servletContext,
          propertiesFolder);
        IResourceStream stream = webPath.find(Initializer.class, velocityPropertiesFile);
        InputStream is = null;
        try
        {
          is = stream.getInputStream();
          Properties props = new Properties();
View Full Code Here

    ServletContext context = Mockito.mock(ServletContext.class);
    Mockito.when(context.getResource(Matchers.any(String.class))).thenReturn(webUrl);

    WebApplicationPath path = new WebApplicationPath(context, "");
    IResourceStream resourceStream = path.find(String.class, "WEB-INF/web.xml");
    assertNull(resourceStream);

    IResourceStream otherResourceStream = path.find(String.class, "any/other/resource");
    assertNotNull(otherResourceStream);
View Full Code Here

    WebApplicationPath path = new WebApplicationPath(context, "");
    IResourceStream resourceStream = path.find(String.class, "WEB-INF/web.xml");
    assertNull(resourceStream);

    IResourceStream otherResourceStream = path.find(String.class, "any/other/resource");
    assertNotNull(otherResourceStream);

  }
}
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.