Examples of fixture()


Examples of com.pugh.sockso.tests.TestDatabase.fixture()

    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

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

    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

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

    }
   
    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

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

        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

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

    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

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

        final DBCollectionManager cm = new DBCollectionManager( db, p, indexer );
        final String artistName = "My Artist";
       
        int firstArtistId = 0, secondArtistId = 0;

        db.fixture( "checkArtistTagChange" );

        Tag newTag = createMock( Tag.class );
        expect( newTag.getArtist() ).andReturn( artistName ).times(2);
        replay( newTag );
View Full Code Here

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

    public void testGetTrack() throws Exception {

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

        db.fixture( "singleTrack" );

        final Track track = cm.getTrack( 1 );
       
        assertTrue( track.getPath().equals("/music/track.mp3") );
       
View Full Code Here

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

        final TestDatabase db = new TestDatabase();
        final DBCollectionManager cm = new DBCollectionManager( db, p, indexer );
        final String name = Utils.getRandomString( 20 );

        db.fixture( "singleTrack" );

        final Track[] tracks = new Track[] {
            cm.getTrack( 1 )
        };
View Full Code Here

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

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

        // Should delete Artists with no Track or Album references
        db.fixture( "artists" );

        assertTableSize( db, "artists", 3 );
        assertTableSize( db, "albums", 0 );
        assertTableSize( db, "tracks", 0 );
View Full Code Here

Examples of com.pugh.sockso.tests.TestDatabase.fixture()

        Validater v = new Validater( db );
        final String email = "rod@pu-gh.com";

        assertFalse( v.emailExists(email) );

        db.fixture( "singleUser" );

        assertTrue( v.emailExists(email) );
       
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.