use of com.axway.ats.rbv.filesystem.rules.FileFolderRule in project ats-framework by Axway.
the class Test_FileFolderRule method getRuleDescFolder.
@Test
public void getRuleDescFolder() {
rule = new FileFolderRule(false, "ruleName", true);
assertEquals(rule.getRuleDescription(), "which expects a 'folder'");
}
use of com.axway.ats.rbv.filesystem.rules.FileFolderRule in project ats-framework by Axway.
the class Test_FileFolderRule method getRuleDescFile.
@Test
public void getRuleDescFile() {
rule = new FileFolderRule(true, "ruleName", true);
assertEquals(rule.getRuleDescription(), "which expects a 'file'");
}
use of com.axway.ats.rbv.filesystem.rules.FileFolderRule in project ats-framework by Axway.
the class Test_FileFolderRule method performMatch.
@Test
public void performMatch() throws RbvException, PackageException {
expect(meta.getFilePackage()).andReturn(pack);
expect(pack.isFile()).andReturn(true);
replayAll();
rule = new FileFolderRule(true, "ruleName", true);
assertTrue(rule.performMatch(meta));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileFolderRule in project ats-framework by Axway.
the class Test_FileFolderRule method getMetaDataKeys.
@Test
public void getMetaDataKeys() {
List<String> metaKeys = new ArrayList<String>();
metaKeys.add(FileSystemMetaData.FILE_PACKAGE);
rule = new FileFolderRule(false, "ruleName", true);
assertEquals(rule.getMetaDataKeys(), metaKeys);
}
use of com.axway.ats.rbv.filesystem.rules.FileFolderRule in project ats-framework by Axway.
the class FileSystemVerification method addFolderCheckRule.
private void addFolderCheckRule() {
// set the second highest priority for this rule - if the folder path is correct the second most
// important thing is to check if the entity is a folder
FileFolderRule rule = new FileFolderRule(false, "checkIsDirectory", true, Integer.MIN_VALUE);
rootRule.addRule(rule);
}
Aggregations