use of com.axway.ats.rbv.MetaData 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.MetaData 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.MetaData 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();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithFileExpectTrueNegativeWrongFile.
@Test
public void isMatchConstructWithFileExpectTrueNegativeWrongFile() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getModTime()).andReturn(modtime);
expect(pack.getModTime()).andReturn(123l);
replayAll();
FileModtimeRule rule = new FileModtimeRule(null, testFilePath, "isMatchConstructWithFileExpectTrueNegativeWrongFile", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FilePathRule method isMatchExpectedTruePositive.
@Test
public void isMatchExpectedTruePositive() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(testFileAbsPath, "isMatchExpectedTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations