use of gov.loc.repository.bagit.domain.Bag in project bagit-java by LibraryOfCongress.
the class BagVerifierTest method testVersion0_97IsValid.
@Test
public void testVersion0_97IsValid() throws Exception {
Bag bag = reader.read(rootDir);
sut.isValid(bag, true);
}
use of gov.loc.repository.bagit.domain.Bag in project bagit-java by LibraryOfCongress.
the class BagVerifierTest method testCorruptTagFile.
@Test(expected = CorruptChecksumException.class)
public void testCorruptTagFile() throws Exception {
rootDir = Paths.get(new File("src/test/resources/corruptTagFile").toURI());
Bag bag = reader.read(rootDir);
sut.isValid(bag, true);
}
use of gov.loc.repository.bagit.domain.Bag in project bagit-java by LibraryOfCongress.
the class PayloadVerifierTest method testBagWithTagFilesInPayloadIsValid.
@Test
public void testBagWithTagFilesInPayloadIsValid() throws Exception {
rootDir = Paths.get(new File("src/test/resources/bags/v0_96/bag-with-tagfiles-in-payload-manifest").toURI());
Bag bag = reader.read(rootDir);
sut.verifyPayload(bag, true);
}
use of gov.loc.repository.bagit.domain.Bag in project bagit-java by LibraryOfCongress.
the class QuickVerifierTest method testInvalidByteSizeForQuickVerify.
@Test(expected = InvalidPayloadOxumException.class)
public void testInvalidByteSizeForQuickVerify() throws Exception {
Path badRootDir = Paths.get(new File("src/test/resources/badPayloadOxumByteSize/bag").toURI());
Bag bag = reader.read(badRootDir);
QuickVerifier.quicklyVerify(bag);
}
use of gov.loc.repository.bagit.domain.Bag in project bagit-java by LibraryOfCongress.
the class QuickVerifierTest method testQuickVerify.
@Test
public void testQuickVerify() throws Exception {
Path passingRootDir = Paths.get(new File("src/test/resources/bags/v0_94/bag").toURI());
Bag bag = reader.read(passingRootDir);
QuickVerifier.quicklyVerify(bag);
}
Aggregations