Search in sources :

Example 6 with FileContentRule

use of com.axway.ats.rbv.filesystem.rules.FileContentRule in project ats-framework by Axway.

the class Test_FileContentRule method isMatch.

@Test
public void isMatch() throws Exception {
    expect(testFilePackage.grep(EXPRESSION, false)).andReturn(new String[] { EXPRESSION });
    replayAll();
    FileContentRule rule = new FileContentRule(EXPRESSION, RULE_NAME, false, true);
    MetaData metaData = new FileSystemMetaData(testFilePackage);
    assertTrue(rule.isMatch(metaData));
    verifyAll();
}
Also used : FileContentRule(com.axway.ats.rbv.filesystem.rules.FileContentRule) FileSystemMetaData(com.axway.ats.rbv.filesystem.FileSystemMetaData) MetaData(com.axway.ats.rbv.MetaData) FileSystemMetaData(com.axway.ats.rbv.filesystem.FileSystemMetaData) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

FileContentRule (com.axway.ats.rbv.filesystem.rules.FileContentRule)6 BaseTest (com.axway.ats.rbv.BaseTest)5 Test (org.junit.Test)5 MetaData (com.axway.ats.rbv.MetaData)4 FileSystemMetaData (com.axway.ats.rbv.filesystem.FileSystemMetaData)4 PackageException (com.axway.ats.action.objects.model.PackageException)1 PublicAtsApi (com.axway.ats.common.PublicAtsApi)1 ArrayList (java.util.ArrayList)1