Package org.apache.archiva.rest.api.services

Examples of org.apache.archiva.rest.api.services.BrowseService


    @Test
    public void browsegroupIdWithReleaseStartNumber()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, false );
        BrowseResult browseResult = browseService.browseGroupId( "commons-logging.commons-logging", TEST_REPO_ID );
        log.info( "browseResult: {}", browseResult );
    }
View Full Code Here


    @Test
    public void versionsList()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, false );

        VersionsList versions =
            browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core", TEST_REPO_ID );
        assertThat( versions ).isNotNull();
        assertThat( versions.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 ).contains( "2.2.1", "2.2.2" );
    }
View Full Code Here

    @Test
    public void getProjectVersionMetadata()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        ProjectVersionMetadata metadata = browseService.getProjectVersionMetadata( "org.apache.karaf.features",
                                                                                   "org.apache.karaf.features.core",
                                                                                   TEST_REPO_ID );

        assertThat( metadata ).isNotNull();
    }
View Full Code Here

    @Test
    public void readArtifactContentEntries()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null, null,
                                                     TEST_REPO_ID );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 2 ).contains( new ArtifactContentEntry(
View Full Code Here

    @Test
    public void readArtifactContentEntriesRootPath()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null, "org/",
                                                     TEST_REPO_ID );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 1 ).contains(
View Full Code Here

    @Test
    public void readArtifactContentEntriesFilesAndDirectories()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null,
                                                     "org/apache/commons/logging/", TEST_REPO_ID );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 10 ).contains(
View Full Code Here

    @Test
    public void getArtifactDownloadInfos()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<Artifact> artifactDownloadInfos =
            browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", TEST_REPO_ID );

        log.info( "artifactDownloadInfos {}", artifactDownloadInfos );
        assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 );
    }
View Full Code Here

    @Test
    public void readArtifactContentText()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        WebClient.client( browseService ).accept( MediaType.TEXT_PLAIN );

        String text =
            browseService.getArtifactContentText( "commons-logging", "commons-logging", "1.1", "sources", null,
                                                  "org/apache/commons/logging/LogSource.java",
                                                  TEST_REPO_ID ).getContent();

        log.debug( "text: {}", text );
View Full Code Here

    @Test
    public void readArtifactContentTextPom()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        WebClient.client( browseService ).accept( MediaType.TEXT_PLAIN );

        String text =
            browseService.getArtifactContentText( "commons-logging", "commons-logging", "1.1", null, "pom", null,
                                                  TEST_REPO_ID ).getContent();

        log.info( "text: {}", text );

        assertThat( text ).contains(
View Full Code Here

    @Test
    public void artifactsNumber()
        throws Exception
    {
        BrowseService browseService = getBrowseService( authorizationHeader, true );

        //WebClient.client( browseService ).accept( MediaType.TEXT_PLAIN );

        int number = browseService.getArtifacts( TEST_REPO_ID ).size();

        log.info( "getArtifactsNumber: {}", number );

        assertTrue( number > 1 );
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.rest.api.services.BrowseService

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.