Search in sources :

Example 1 with TestListing

use of org.commonjava.maven.galley.testing.core.transport.job.TestListing in project indy by Commonjava.

the class MavenMetadataGeneratorTest method setupVersionsStructureWith2Versions.

private StoreResource setupVersionsStructureWith2Versions() throws Exception {
    final RemoteRepository store = new RemoteRepository(MAVEN_PKG_KEY, "testrepo", "http://foo.bar");
    stores.storeArtifactStore(store, summary, false, true, new EventMetadata());
    final String path = "org/group/artifact";
    final KeyedLocation location = LocationUtils.toLocation(store);
    final StoreResource resource = new StoreResource(location, path);
    fixture.getTransport().registerListing(resource, new TestListing(new ListingResult(resource, new String[] { "1.0/", "1.1/" })));
    ConcreteResource versionDir = (resource.getChild("1.0/"));
    fixture.getTransport().registerListing(versionDir, new TestListing(new ListingResult(versionDir, new String[] { "artifact-1.0.jar", "artifact-1.0.pom" })));
    versionDir = (resource.getChild("1.1/"));
    fixture.getTransport().registerListing(versionDir, new TestListing(new ListingResult(versionDir, new String[] { "artifact-1.1.jar", "artifact-1.1.pom" })));
    return resource;
}
Also used : StoreResource(org.commonjava.indy.content.StoreResource) KeyedLocation(org.commonjava.indy.model.galley.KeyedLocation) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) TestListing(org.commonjava.maven.galley.testing.core.transport.job.TestListing) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) ListingResult(org.commonjava.maven.galley.model.ListingResult) EventMetadata(org.commonjava.maven.galley.event.EventMetadata)

Example 2 with TestListing

use of org.commonjava.maven.galley.testing.core.transport.job.TestListing in project indy by Commonjava.

the class MavenMetadataGeneratorTest method setupSnapshotDirWith2Snapshots.

private StoreResource setupSnapshotDirWith2Snapshots() throws Exception {
    final RemoteRepository store = new RemoteRepository(MAVEN_PKG_KEY, "testrepo", "http://foo.bar");
    stores.storeArtifactStore(store, summary, false, true, new EventMetadata());
    final String path = "org/group/artifact/1.0-SNAPSHOT";
    final KeyedLocation location = LocationUtils.toLocation(store);
    final StoreResource resource = new StoreResource(location, path);
    final TestListing listing = new TestListing(new ListingResult(resource, new String[] { "artifact-1.0-20140828.221400-1.pom", "artifact-1.0-20140828.221400-1.jar", "artifact-1.0-20140828.225800-1.pom", "artifact-1.0-20140828.225800-1.jar" }));
    fixture.getTransport().registerListing(resource, listing);
    return resource;
}
Also used : StoreResource(org.commonjava.indy.content.StoreResource) KeyedLocation(org.commonjava.indy.model.galley.KeyedLocation) TestListing(org.commonjava.maven.galley.testing.core.transport.job.TestListing) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) ListingResult(org.commonjava.maven.galley.model.ListingResult) EventMetadata(org.commonjava.maven.galley.event.EventMetadata)

Aggregations

StoreResource (org.commonjava.indy.content.StoreResource)2 RemoteRepository (org.commonjava.indy.model.core.RemoteRepository)2 KeyedLocation (org.commonjava.indy.model.galley.KeyedLocation)2 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)2 ListingResult (org.commonjava.maven.galley.model.ListingResult)2 TestListing (org.commonjava.maven.galley.testing.core.transport.job.TestListing)2 ConcreteResource (org.commonjava.maven.galley.model.ConcreteResource)1