use of com.axway.ats.rbv.filesystem.rules.FilePermRule 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.rules.FilePermRule in project ats-framework by Axway.
the class Test_FilePermRule method isMatchNullMetaData.
@Test(expected = RbvException.class)
public void isMatchNullMetaData() throws Exception {
expect(pack.getPermissions()).andReturn(123l);
replayAll();
FilePermRule rule = new FilePermRule(123l, "isMatchNullMetaData", true);
assertFalse(rule.isMatch(null));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FilePermRule 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();
}
Aggregations