use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchConstructWithMd5ExpectFalsePositive.
@Test
public void isMatchConstructWithMd5ExpectFalsePositive() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("23234234", "isMatchConstructWithMd5ExpectFalsePositive", false);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileMd5Rule in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchConstructWithMd5ExpectTrueNegativeEmptyMd5.
@Test
public void isMatchConstructWithMd5ExpectTrueNegativeEmptyMd5() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("", "isMatchConstructWithMd5ExpectTrueNegativeEmptyMd5", 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 isMatchConstructWithMd5ExpectTrueNegativeNullMd5.
@Test
public void isMatchConstructWithMd5ExpectTrueNegativeNullMd5() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(null, "isMatchConstructWithMd5ExpectTrueNegativeNullMd5", 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 isMatchConstructWithMd5ExpectFalseNegative.
@Test
public void isMatchConstructWithMd5ExpectFalseNegative() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(md5sum, "isMatchConstructWithMd5ExpectFalseNegative", false);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
Aggregations