use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FilePathRule method isMatchExpectedTrueNegativeNullPath.
@Test
public void isMatchExpectedTrueNegativeNullPath() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(null, "isMatchExpectedTrueNegativeNullPath", 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_FilePermRule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws Exception {
expect(pack.getPermissions()).andReturn(123l);
replayAll();
FilePermRule rule = new FilePermRule(123l, "isMatchInvalidMetaDataContent", true);
MetaData metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithSizeNegative.
@Test
public void isMatchConstructWithSizeNegative() throws Exception {
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(11100l, "isMatchConstructWithSizeNegative", 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 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.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithFileNegative.
@Test
public void isMatchConstructWithFileNegative() throws Exception {
expectNew(FilePackage.class, null, null, testPath).andReturn(pack);
expect(pack.getSize()).andReturn(11100l);
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(null, testPath, "isMatchConstructWithFileNegative", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
Aggregations