Package org.apache.wicket.request.resource

Examples of org.apache.wicket.request.resource.PackageResource


   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here


  @Test
  public void textFileWithEncoding()
  {
    final String encoding = "Klingon-8859-42";
    final PackageResource resource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };
    resource.setTextEncoding(encoding);
    tester.startResource(resource);
    final String contentType = tester.getLastResponse().getContentType();
    assertEquals("text/plain; charset=" + encoding, contentType);
  }
View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here

  @Test
  public void textFileWithEncoding()
  {
    final String encoding = "Klingon-8859-42";
    final PackageResource resource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };
    resource.setTextEncoding(encoding);
    tester.startResource(resource);
    final String contentType = tester.getLastResponse().getContentType();
    assertEquals("text/plain; charset=" + encoding, contentType);
  }
View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here

  @Test
  public void textFileWithEncoding()
  {
    final String encoding = "Klingon-8859-42";
    final PackageResource resource =
      new PackageResource(PackageResourceTest.class, "packaged1.txt", null, null, null)
      {
        private static final long serialVersionUID = 1L;
      };
    resource.setTextEncoding(encoding);
    tester.startResource(resource);
    final String contentType = tester.getLastResponse().getContentType();
    assertEquals("text/plain; charset=" + encoding, contentType);
  }
View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4119
   */
  @Test
  public void contentType()
  {
    PackageResource textResource = new PackageResource(PackageResourceTest.class,
      "packaged1.txt", null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

    tester.startResource(textResource);
    assertEquals("text/plain", tester.getLastResponse().getContentType());

    PackageResource jsResource = new PackageResource(PackageResourceTest.class, "packaged3.js",
      null, null, null)
    {
      private static final long serialVersionUID = 1L;
    };

View Full Code Here

   *
   * @param reference
   */
  public ImageResourceInfo(ResourceReference reference)
  {
    this(new PackageResource(reference.getScope(), reference.getName(), null, null, null){});
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.resource.PackageResource

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.