Examples of fixture()


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

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

        // Should not delete an Artist that has Albums referencing it
        db.fixture( "artistsWithAlbums" );

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

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

        Validater v = new Validater( db );
        final String username = "foo";

        assertFalse( v.usernameExists(username) );

        db.fixture( "singleUser" );

        assertTrue( v.usernameExists(username) );
       
    }
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 not delete an Artist that has Tracks referencing it
        db.fixture( "artistsWithTracks" );

        assertTableSize( db, "artists", 1 );
        assertTableSize( db, "albums", 0 );
        assertTableSize( db, "tracks", 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 Albums that have no Tracks referencing them (Artists OK)
        db.fixture( "artistsWithAlbums" );

        assertTableSize( db, "artists", 1 );
        assertTableSize( db, "albums", 1 );
        assertTableSize( db, "tracks", 0 );
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 not delete an Album that has Tracks referencing it
        db.fixture( "albumsWithTracks" );

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

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

        formats.setSelectedIndex( 1 );
        action.exportRequestLog( saveFile1 );
        File saveFile2 = File.createTempFile( "testLog2", "log" );
        // table cleared after previous log, so need to reset db (can't truncate)
        TestDatabase db2 = new TestDatabase();
        db2.fixture( "requestLogs" );
        action = new RequestLogExport( null, db2, null, formats );
        formats.setSelectedIndex( 2 );
        action.exportRequestLog( saveFile1 );
        assertFilesNotEqual( saveFile1, saveFile2 );
    }
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( "albumTracks" );
        res = new TestResponse();
        action = new AlbumTracksAction();
        action.setDatabase( db );
        action.setResponse( res );
    }
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 AlbumAction();
        action.setDatabase( db );
        action.setResponse( res );
       
View Full Code Here

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

   
    @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

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 PlaylistAction();
        action.setDatabase( db );
        action.setResponse( res );
    }
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.