use of com.axway.ats.rbv.filesystem.rules.FileGidRule in project ats-framework by Axway.
the class FileSystemVerification method checkGIDDifferent.
/**
* Add rule to check that the UID of the received file is different
* than the given one (NOT SUPPORTED ON WINDOWS)
*
* @param gid
*/
@PublicAtsApi
public void checkGIDDifferent(long gid) {
FileGidRule rule = new FileGidRule(gid, "checkGIDDifferent", false);
rootRule.addRule(rule);
}
use of com.axway.ats.rbv.filesystem.rules.FileGidRule in project ats-framework by Axway.
the class FileSystemVerification method checkGIDDifferent.
/**
* Add rule to check that the GID of the received file is different
* than the GID of the source file (NOT SUPPORTED ON WINDOWS)
*
* @param srcAtsAgent the remote ATS agent address on which the source file is located
* @param srcFile the full name of the file
* @throws RbvException thrown on error
*/
@PublicAtsApi
public void checkGIDDifferent(String srcAtsAgent, String srcFile) throws RbvException {
FileGidRule rule = new FileGidRule(srcAtsAgent, srcFile, "checkGIDDifferent", false);
rootRule.addRule(rule);
}
use of com.axway.ats.rbv.filesystem.rules.FileGidRule in project ats-framework by Axway.
the class FileSystemVerification method checkGID.
/**
* Add rule to check that the GID of the received file is the same
* as the given one (NOT SUPPORTED ON WINDOWS)
*
* @param gid
*/
@PublicAtsApi
public void checkGID(long gid) {
FileGidRule rule = new FileGidRule(gid, "checkGID", true);
rootRule.addRule(rule);
}
use of com.axway.ats.rbv.filesystem.rules.FileGidRule in project ats-framework by Axway.
the class Test_FileGIDRule method performMatchOtherFile.
@Test
public void performMatchOtherFile() throws Exception {
FilePackage remotePack = createMock(FilePackage.class);
expectNew(FilePackage.class, null, null, "/root/file.name").andReturn(remotePack);
expect(remotePack.getGid()).andReturn(1L);
expect(meta.getFilePackage()).andReturn(pack);
expect(pack.getGid()).andReturn(1L);
replayAll();
rule = new FileGidRule(null, "/root/file.name", "ruleName", true);
assertTrue(rule.performMatch(meta));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileGidRule in project ats-framework by Axway.
the class Test_FileGIDRule method getMetaDataKeys.
@Test
public void getMetaDataKeys() {
List<String> metaKeys = new ArrayList<String>();
metaKeys.add(FileSystemMetaData.FILE_PACKAGE);
rule = new FileGidRule(1, "ruleName", true);
assertEquals(rule.getMetaDataKeys(), metaKeys);
}
Aggregations