use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(123l, "isMatchInvalidMetaDataContent", true);
MetaData metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchNullMetaData.
@Test(expected = RbvException.class)
public void isMatchNullMetaData() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(123, "isMatchNullMetaData", true);
assertFalse(rule.isMatch(null));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule 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();
}
Aggregations