use of org.apache.archiva.repository.content.base.ArchivaContentItem in project archiva by apache.
the class ManagedDefaultRepositoryContentTest method testToItemFromPath.
@Test
public void testToItemFromPath() throws LayoutException {
String path = "/org/apache/maven/shared";
ContentItem item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = "/org/apache/maven/shared/maven-downloader";
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = "/org/apache/maven/shared/maven-downloader/1.1";
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = "/org/apache/maven/shared/maven-downloader/1.1/maven-downloader-1.1.jar";
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof DataItem);
}
use of org.apache.archiva.repository.content.base.ArchivaContentItem in project archiva by apache.
the class ManagedDefaultRepositoryContentTest method testToItemFromAssetPath.
@Test
public void testToItemFromAssetPath() throws LayoutException {
StorageAsset path = repoContent.getRepository().getAsset("/org/apache/maven/shared");
ContentItem item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = repoContent.getRepository().getAsset("/org/apache/maven/shared/maven-downloader");
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = repoContent.getRepository().getAsset("/org/apache/maven/shared/maven-downloader/1.1");
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof ArchivaContentItem);
path = repoContent.getRepository().getAsset("/org/apache/maven/shared/maven-downloader/1.1/maven-downloader-1.1.jar");
item = repoContent.toItem(path);
assertNotNull(item);
assertTrue(item instanceof DataItem);
}
Aggregations