use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithModTimeExpectTrueNegativeWrongFile.
@Test
public void isMatchConstructWithModTimeExpectTrueNegativeWrongFile() throws Exception {
expect(pack.getModTime()).andReturn(123L);
replayAll();
FileModtimeRule rule = new FileModtimeRule(modtime, "isMatchConstructWithModTimeExpectTrueNegativeWrongFile", 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_FileModtimeRule method isMatchConstructWithModTimeExpectTruePositive.
@Test
public void isMatchConstructWithModTimeExpectTruePositive() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(modtime, "isMatchConstructWithModTimeExpectTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithFileExpectTruePositive.
@Test
public void isMatchConstructWithFileExpectTruePositive() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getModTime()).andReturn(modtime);
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(null, testFilePath, "isMatchConstructWithFileExpectTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_StringInMimePartRule method isMatchWrongMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchWrongMetaData() throws RbvException {
StringInMimePartRule rule = new StringInMimePartRule("US AIR FORCE", false, 2, false, "isMatchEmptyMetaData", false);
metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchConstructWithFileExpectTruePositive.
@Test
public void isMatchConstructWithFileExpectTruePositive() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getMd5sum()).andReturn(md5sum);
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule(null, testFilePath, "isMatchConstructWithFileExpectTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations