use of com.axway.ats.rbv.MetaData 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.MetaData 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.MetaData 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.MetaData in project ats-framework by Axway.
the class Test_FileMD5Rule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws PackageException, RbvException {
expect(pack.getMd5sum(true)).andReturn(md5sum);
replayAll();
FileMd5Rule rule = new FileMd5Rule("", "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_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