Package net.sourceforge.pebble.web.view

Examples of net.sourceforge.pebble.web.view.View


    super.setUp();
  }

  public void testProcess() throws Exception {
    View view = action.process(request, response);

    assertEquals(new Category(), action.getModel().get(Constants.CATEGORY_KEY));
    assertTrue(view instanceof ForwardView);
    assertEquals("/viewCategories.secureaction", ((ForwardView)view).getUri());
  }
View Full Code Here


  service.putBlogEntry(unpublishedEntry);
  }

  public void testPdfViewForNonExistingBlogEntryId() throws Exception {
  request.setParameter("entry", "88888888888");
    View view = action.process(request, response);
    assertTrue(view instanceof NotFoundView);
  }
View Full Code Here

    assertTrue(view instanceof NotFoundView);
  }

   public void testPdfViewForPublishedBlogEntryInvalidParameterName() throws Exception {
  request.setParameter("momo", publishedEntry.getId());
    View view = action.process(request, response);
    assertTrue(view instanceof NotFoundView);
  }
View Full Code Here

    assertTrue(view instanceof NotFoundView);
  }

  public void testPdfViewForNullBlogEntryId() throws Exception {
  request.setParameter("entry", "");
    View view = action.process(request, response);
    assertTrue(view instanceof NotFoundView);
  }
View Full Code Here

    assertTrue(view instanceof NotFoundView);
  }

   public void testPdfViewForUnpublishedBlogEntry() throws Exception {
  request.setParameter("entry", unpublishedEntry.getId());
    View view = action.process(request, response);
    assertTrue(view instanceof PdfView);
 
  PdfView pdfView = (PdfView) view;
  assertEquals("application/pdf", pdfView.getContentType());
  }
View Full Code Here

  assertEquals("application/pdf", pdfView.getContentType());
  }

  public void testPdfViewForPublishedBlogEntry() throws Exception {
  request.setParameter("entry", publishedEntry.getId());
    View view = action.process(request, response);
    assertTrue(view instanceof PdfView);
 
  PdfView pdfView = (PdfView) view;
  assertEquals("application/pdf", pdfView.getContentType());
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.web.view.View

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.