use of com.axway.ats.rbv.filesystem.FileSystemMetaData in project ats-framework by Axway.
the class Test_FilePathRule method isMatchExpectedTrueNegativeRegex.
@Test
public void isMatchExpectedTrueNegativeRegex() throws Exception {
expect(pack.getAbsolutePath()).andReturn(testFileAbsPath);
expect(pack.getName()).andReturn(testFileAbsPath.substring(testFileAbsPath.lastIndexOf('/') + 1));
replayAll();
FilePathRule rule = new FilePathRule(wrongFilePath, "p.*1.+xt", "isMatchExpectedTrueNegative", true, 1);
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_FilePermRule method isMatchConstructorWithPermissionExpectFalseNegative.
@Test
public void isMatchConstructorWithPermissionExpectFalseNegative() throws Exception {
expect(pack.getPermissions()).andReturn(FilePackage.ATTRIBUTE_NOT_SUPPORTED);
replayAll();
FilePermRule rule = new FilePermRule(FilePackage.ATTRIBUTE_NOT_SUPPORTED, "isMatchConstructorWithPermissionExpectFalseNegative", false);
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_FilePermRule method isMatchConstructorWithPermissionExpectFalsePositive.
@Test
public void isMatchConstructorWithPermissionExpectFalsePositive() throws Exception {
expect(pack.getPermissions()).andReturn(123l);
replayAll();
FilePermRule rule = new FilePermRule(456l, "isMatchConstructorWithPermissionExpectFalsePositive", false);
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_FileMD5Rule method isMatchConstructWithMd5ExpectTrueNegative.
@Test
public void isMatchConstructWithMd5ExpectTrueNegative() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("23234234", "isMatchConstructWithMd5ExpectTrueNegative", 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_FileMD5Rule method isMatchConstructWithMd5ExpectFalsePositive.
@Test
public void isMatchConstructWithMd5ExpectFalsePositive() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("23234234", "isMatchConstructWithMd5ExpectFalsePositive", false);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations