use of com.axway.ats.rbv.filesystem.FileSystemMetaData 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.filesystem.FileSystemMetaData in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithModTimeExpectTrueNegative.
@Test
public void isMatchConstructWithModTimeExpectTrueNegative() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(123l, "isMatchConstructWithModTimeExpectTrueNegative", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.FileSystemMetaData 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.filesystem.FileSystemMetaData in project ats-framework by Axway.
the class Test_FilePathRule method isMatchNullMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchNullMetaDataContent() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(testFileAbsPath, "isMatchNullMetaDataContent", true);
MetaData metaData = new FileSystemMetaData(null);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.FileSystemMetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithSizeExpectFalsePositive.
@Test
public void isMatchConstructWithSizeExpectFalsePositive() throws Exception {
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(11100l, "isMatchConstructWithSizeExpectFalsePositive", false);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations