2 Replies Latest reply on Jun 25, 2009 7:44 PM by Erik Bakstad

    Testing AbstractResource implementations

    Erik Bakstad Newbie

      Hi!


      Is it possible to test AbstractResource implementations using SeamTest?


      I've tries something like this but it doesn't work:




      public class FlashStreamerTest extends DBUnitSeamTest {
           private Long createdFolderId;
      
           protected void prepareDBUnitOperations() {
                ...
           }
      
          @Test
          public void testStreamer() throws Exception {
      
              new  FacesRequest("/seam/resource/video/Images") {
                      protected void beforeRequest() {
                             setParameter("file","video.flv");
                      }
      
                  protected void renderResponse() {
                  }
              }.run();
      
      //or
      
              new NonFacesRequest("/seam/resource/video/Images") {
                      protected void beforeRequest() {
                             setParameter("file","video.flv");
                      }
      
                  protected void renderResponse() {
                  }
              }.run();
          }
      }
      
      



      If not, does anybody have some alternative way of testing this?


      Thanks!


      Erik