Package com.pugh.sockso.tests

Examples of com.pugh.sockso.tests.TestResponse


public class UploaderTest extends SocksoTestCase {

    public void testShowUploadForm() throws Exception {

        final Uploader u = new Uploader( null );
        final TestResponse res = new TestResponse();

        u.setLocale( TestUtils.getLocale() );
        u.setProperties( new StringProperties() );
        u.setResponse( res );
       
        u.showUploadForm();

        assertTrue( res.getOutput().length() > 500 );

    }
View Full Code Here


   
    @Override
    protected void setUp() throws Exception {
        TestDatabase db = new TestDatabase();
        db.fixture( "albums" );
        res = new TestResponse();
        action = new AlbumAction();
        action.setDatabase( db );
        action.setResponse( res );
       
    }
View Full Code Here

   
    private TestResponse res;
   
    @Override
    protected void setUp() throws Exception {
        res = new TestResponse();
        TestDatabase db = new TestDatabase();
        db.fixture( "artistsAlbumsAndTracks" );
        action = new ArtistAction();
        action.setDatabase( db );
        action.setResponse( res );
View Full Code Here

   
    @Override
    protected void setUp() throws Exception {
        TestDatabase db = new TestDatabase();
        db.fixture( "playlists" );
        res = new TestResponse();
        action = new PlaylistAction();
        action.setDatabase( db );
        action.setResponse( res );
    }
View Full Code Here

        testUser = new User( -1, "foo" );

        db = new TestDatabase();
        p = new StringProperties();
        req = new TestRequest( "" );
        resp = new TestResponse();
        u = new Userer();
        u.addAuthenticator( new DBAuthenticator(db) );
        u.setDatabase( db );
        u.setRequest( req );
        u.setProperties( p );
View Full Code Here

    public void testShowUserUpdated() throws Exception {
       
        final User user = new User( 1, "foo" );
        final Userer u = new Userer();
        final TestResponse res = new TestResponse();
       
        u.setResponse( res );
        u.showUserUpdated();
               
        final String data = res.getOutput();
       
        assertTrue( data.length() > 0 );
       
    }
View Full Code Here

    }
   
    public void testShowUserEdit() throws Exception {
       
        final Userer u = new Userer();
        final TestResponse res = new TestResponse();
       
        u.setResponse( res );
        u.showUserEdit();

        final String data = res.getOutput();
       
        assertTrue( data.length() > 0 );
       
    }
View Full Code Here

    private TestLocale locale;
   
    @Override
    public void setUp() {
        locale = new TestLocale();
        res = new TestResponse();
        p = new StringProperties();
        c = new Console( null );
        c.setResponse( res );
        c.setProperties( p );
        c.setLocale( locale );
View Full Code Here

    }

    public void testShowUserRegister() throws Exception {
       
        final Userer u = new Userer();
        final TestResponse res = new TestResponse();
       
        u.setResponse( res );
        u.showUserRegister();

        final String data = res.getOutput();
       
        assertTrue( data.length() > 0 );
       
    }
View Full Code Here

    }
   
    public void testShowUserLogin() throws Exception {
       
        final Userer u = new Userer();
        final TestResponse res = new TestResponse();
       
        u.setResponse( res );
        u.showUserLogin();

        final String data = res.getOutput();
       
        assertTrue( data.length() > 0 );
       
    }
View Full Code Here

TOP

Related Classes of com.pugh.sockso.tests.TestResponse

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.