use of com.axway.ats.rbv.filesystem.rules.FilePathRule in project ats-framework by Axway.
the class Test_FilePathRule method isMatchExpectedFalseNegative.
@Test
public void isMatchExpectedFalseNegative() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(testFileAbsPath, "isMatchExpectedFalseNegative", false);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FilePathRule in project ats-framework by Axway.
the class Test_FilePathRule method isMatchExpectedTrueNegative.
@Test
public void isMatchExpectedTrueNegative() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(wrongFilePath, "isMatchExpectedTrueNegative", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FilePathRule in project ats-framework by Axway.
the class Test_FilePathRule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
replayAll();
FilePathRule rule = new FilePathRule(testFileAbsPath, "isMatchInvalidMetaDataContent", true);
MetaData metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FilePathRule 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();
}
Aggregations