use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method constructorWithMachineBinaryRepencrypt.
@Test
public void constructorWithMachineBinaryRepencrypt() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(null, testFilePath, true, "constructorWithMachineBinaryRepencrypt", true);
assertTrue(rule != null);
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method constructorWithNullMachineBinaryRepencrypt.
@Test
public void constructorWithNullMachineBinaryRepencrypt() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(null, testFilePath, true, "constructorWithNullMachineBinaryRepencrypt", true);
assertTrue(rule != null);
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchConstructWithMd5ExpectTrueNegative.
@Test
public void isMatchConstructWithMd5ExpectTrueNegative() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("23234234", "isMatchConstructWithMd5ExpectTrueNegative", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("", "isMatchInvalidMetaDataContent", true);
MetaData metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method constructorWithMachine.
@Test
public void constructorWithMachine() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getMd5sum()).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(null, testFilePath, "constructorWithMachine", true);
assertTrue(rule != null);
verifyAll();
}
Aggregations