Search in sources :

Example 1 with StandardBagitAlgorithmNameToSupportedAlgorithmMapping

use of gov.loc.repository.bagit.hash.StandardBagitAlgorithmNameToSupportedAlgorithmMapping in project bagit-java by LibraryOfCongress.

the class ManifestReaderTest method testReadAllManifests.

@Test
public void testReadAllManifests() throws Exception {
    Path rootBag = Paths.get(getClass().getClassLoader().getResource("bags/v0_97/bag").toURI());
    Bag bag = new Bag();
    bag.setRootDir(rootBag);
    ManifestReader.readAllManifests(new StandardBagitAlgorithmNameToSupportedAlgorithmMapping(), rootBag, bag);
    assertEquals(1, bag.getPayLoadManifests().size());
    assertEquals(1, bag.getTagManifests().size());
}
Also used : Path(java.nio.file.Path) Bag(gov.loc.repository.bagit.domain.Bag) StandardBagitAlgorithmNameToSupportedAlgorithmMapping(gov.loc.repository.bagit.hash.StandardBagitAlgorithmNameToSupportedAlgorithmMapping) PrivateConstructorTest(gov.loc.repository.bagit.PrivateConstructorTest) Test(org.junit.Test)

Aggregations

PrivateConstructorTest (gov.loc.repository.bagit.PrivateConstructorTest)1 Bag (gov.loc.repository.bagit.domain.Bag)1 StandardBagitAlgorithmNameToSupportedAlgorithmMapping (gov.loc.repository.bagit.hash.StandardBagitAlgorithmNameToSupportedAlgorithmMapping)1 Path (java.nio.file.Path)1 Test (org.junit.Test)1