Package com.pugh.sockso.tests

Examples of com.pugh.sockso.tests.TestDatabase


    private TestDatabase db;

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


   
    private TestResponse res;
   
    @Override
    protected void setUp() throws Exception {
        TestDatabase db = new TestDatabase();
        db.fixture( "playlists" );
        res = new TestResponse();
        action = new PlaylistsAction();
        action.setDatabase( db );
        action.setResponse( res );
        action.setRequest( getRequest("/api/playlists") );
View Full Code Here

   
    private TestDatabase db;
   
    @Override
    protected void setUp() {
        db = new TestDatabase();
        action = new TrackAction();
        action.setDatabase( db );
    }
View Full Code Here

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

        assertFalse( action.canHandle(getRequest( "/api/artists/123" )) );
        assertFalse( action.canHandle(getRequest( "/api/albums/123/tracks" )) );
    }
   
    public void testTracksListedWhenArtistIdFound() throws Exception {
        TestDatabase db = new TestDatabase();
        TestResponse res = new TestResponse();
        db.fixture( "tracksForPath" );
        action.setDatabase( db );
        action.setResponse( res );
        action.setRequest(getRequest( "/api/artists/1/tracks" ));
        action.handleRequest();
        assertContains( res.getOutput(), "My Track 1" );
View Full Code Here

    private IndexEvent indexEvent;
    private TestDatabase db;

    @Override
    public void setUp() throws Exception {
        db = new TestDatabase();
        indexer = new TrackIndexer( db );
        indexer.addIndexListener( this );
        indexEvent = null;
    }
View Full Code Here

        indexer.updateCache();
       
    }

    public void testCompleteEventFiredAfterScan() {
        final Indexer i = new TrackIndexer( new TestDatabase() );
        i.addIndexListener( this );
        i.scan();
        assertEquals( IndexEvent.Type.COMPLETE, this.indexEvent.getType() );
    }
View Full Code Here

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

    private Properties p;
   
    @Override
    protected void setUp() throws Exception {
       
        TestDatabase db = new TestDatabase();
       
        p = new StringProperties();
        res = new TestResponse();
       
        db.fixture( "artistsAlbumsAndTracks" );
       
        pl = new Xspfer();
        pl.setDatabase( db );
        pl.setResponse( res );
        pl.setProperties( p );
View Full Code Here

        super.tearDown();
    }

    public void testCheckTrackTagInfo() throws Exception {

        final TestDatabase db = new TestDatabase();
        final DBCollectionManager cm = new DBCollectionManager( db, p, indexer );

        db.fixture( "checkTrackTagChange" );

        // Verify that if tag data == track name & number in db then track is not updated
        {
            Track trackBefore = cm.getTrack(1);
View Full Code Here

TOP

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

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.