Package org.apache.archiva.admin.model.beans

Examples of org.apache.archiva.admin.model.beans.LegacyArtifactPath


        throws Exception
    {
        //Path   jaxen/jars/jaxen-1.0-FCS-full.jar
        //Artifact   jaxen:jaxen:1.0-FCS:full:jar
        int initialSize = getArchivaAdministrationService().getLegacyArtifactPaths().size();
        LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath();
        legacyArtifactPath.setArtifact( "wine:bordeaux:2006:GREAT:jar" );
        legacyArtifactPath.setPath( "wine/jars/bordeaux-2006-GREAT.jar" );
        getArchivaAdministrationService().addLegacyArtifactPath( legacyArtifactPath );
        assertEquals( initialSize + 1, getArchivaAdministrationService().getLegacyArtifactPaths().size() );

        getArchivaAdministrationService().deleteLegacyArtifactPath( "wine/jars/bordeaux-2006-GREAT.jar" );
        assertEquals( initialSize, getArchivaAdministrationService().getLegacyArtifactPaths().size() );
View Full Code Here


    public void addAndDeleteLegacyPath()
        throws Exception
    {
        int initialSize = archivaAdministration.getLegacyArtifactPaths().size();

        LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath( "foo", "bar" );
        archivaAdministration.addLegacyArtifactPath( legacyArtifactPath, getFakeAuditInformation() );

        assertTrue( archivaAdministration.getLegacyArtifactPaths().contains( new LegacyArtifactPath( "foo", "bar" ) ) );
        assertEquals( initialSize + 1, archivaAdministration.getLegacyArtifactPaths().size() );

        archivaAdministration.deleteLegacyArtifactPath( legacyArtifactPath.getPath(), getFakeAuditInformation() );

        assertFalse(
            archivaAdministration.getLegacyArtifactPaths().contains( new LegacyArtifactPath( "foo", "bar" ) ) );
        assertEquals( initialSize, archivaAdministration.getLegacyArtifactPaths().size() );
        mockAuditListener.clearEvents();
    }
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithNullInputs()
        throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath( null );
        populateAddLegacyArtifactPathActionFields( addLegacyArtifactPathAction, legacyArtifactPath, null, null, null,
                                                   null, null );

        // test
        actionValidatorManager.validate( addLegacyArtifactPathAction, EMPTY_STRING );
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithBlankInputs()
        throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath( EMPTY_STRING );
        populateAddLegacyArtifactPathActionFields( addLegacyArtifactPathAction, legacyArtifactPath, EMPTY_STRING,
                                                   EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING );

        // test
        actionValidatorManager.validate( addLegacyArtifactPathAction, EMPTY_STRING );
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithInvalidInputs()
        throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath( LEGACY_ARTIFACT_PATH_PATH_INVALID_INPUT );
        populateAddLegacyArtifactPathActionFields( addLegacyArtifactPathAction, legacyArtifactPath,
                                                   GROUP_ID_INVALID_INPUT, ARTIFACT_ID_INVALID_INPUT,
                                                   VERSION_INVALID_INPUT, CLASSIFIER_INVALID_INPUT,
                                                   TYPE_INVALID_INPUT );
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithValidInputs()
        throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath( LEGACY_ARTIFACT_PATH_PATH_VALID_INPUT );
        populateAddLegacyArtifactPathActionFields( addLegacyArtifactPathAction, legacyArtifactPath,
                                                   GROUP_ID_VALID_INPUT, ARTIFACT_ID_VALID_INPUT, VERSION_VALID_INPUT,
                                                   CLASSIFIER_VALID_INPUT, TYPE_VALID_INPUT );

        // test
View Full Code Here

        assertFalse( addLegacyArtifactPathAction.hasFieldErrors() );
    }

    private LegacyArtifactPath createLegacyArtifactPath( String path )
    {
        LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath();
        legacyArtifactPath.setPath( path );
        return legacyArtifactPath;
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.admin.model.beans.LegacyArtifactPath

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.