Examples of queryProjectModels()


Examples of org.apache.maven.archiva.database.ProjectModelDAO.queryProjectModels()

        assertNotNull( savedModel );
        String savedKeyId = JDOHelper.getObjectId( savedModel ).toString();
        assertEquals( "org.apache.maven.archiva:archiva-test-module:1.0", savedKeyId );

        // Test that something has been saved.
        List<ArchivaProjectModel> projects = projectDao.queryProjectModels( null );
        assertNotNull( projects );
        assertEquals( 1, projects.size() );

        // Test that retrieved object is what we expect.
        ArchivaProjectModel firstModel = (ArchivaProjectModel) projects.get( 0 );
View Full Code Here

Examples of org.apache.maven.archiva.database.ProjectModelDAO.queryProjectModels()

        // Change value and save.
        savedModel.setOrigin( "changed" );
        projectDao.saveProjectModel( savedModel );

        // Test that only 1 object is saved.
        assertEquals( 1, projectDao.queryProjectModels( null ).size() );

        // Get the specific artifact.
        ArchivaProjectModel actualModel = projectDao.getProjectModel( "org.apache.maven.archiva",
                                                                      "archiva-test-module", "1.0" );
        assertNotNull( actualModel );
View Full Code Here

Examples of org.apache.maven.archiva.database.ProjectModelDAO.queryProjectModels()

        // Test expected values.
        assertEquals( "archiva-test-module", actualModel.getArtifactId() );
        assertEquals( "changed", actualModel.getOrigin() );

        // Test that only 1 object is saved.
        assertEquals( 1, projectDao.queryProjectModels( null ).size() );

        // Delete object.
        projectDao.deleteProjectModel( actualModel );
        assertEquals( 0, projectDao.queryProjectModels( null ).size() );
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ProjectModelDAO.queryProjectModels()

        // Test that only 1 object is saved.
        assertEquals( 1, projectDao.queryProjectModels( null ).size() );

        // Delete object.
        projectDao.deleteProjectModel( actualModel );
        assertEquals( 0, projectDao.queryProjectModels( null ).size() );
    }

    public void testSaveGetRealProjectModel()
        throws Exception
    {
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.