Search in sources :

Example 11 with FileGidRule

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

the class Test_FileGIDRule method getRuleDescFile.

@Test
public void getRuleDescFile() {
    rule = new FileGidRule(1, "ruleName", true);
    assertEquals(rule.getRuleDescription(), "which expects file with GID '1'");
}
Also used : FileGidRule(com.axway.ats.rbv.filesystem.rules.FileGidRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 12 with FileGidRule

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

the class Test_FileGIDRule method performMatchNegativeWxception.

@Test(expected = RbvException.class)
public void performMatchNegativeWxception() throws RbvException, PackageException {
    expect(meta.getFilePackage()).andReturn(pack);
    expect(pack.getGid()).andThrow(new PackageException(""));
    replayAll();
    rule = new FileGidRule(1, "ruleName", true);
    rule.performMatch(meta);
    verifyAll();
}
Also used : PackageException(com.axway.ats.action.objects.model.PackageException) FileGidRule(com.axway.ats.rbv.filesystem.rules.FileGidRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

FileGidRule (com.axway.ats.rbv.filesystem.rules.FileGidRule)12 BaseTest (com.axway.ats.rbv.BaseTest)8 Test (org.junit.Test)8 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)8 PublicAtsApi (com.axway.ats.common.PublicAtsApi)4 FilePackage (com.axway.ats.action.objects.FilePackage)3 PackageException (com.axway.ats.action.objects.model.PackageException)2 ArrayList (java.util.ArrayList)1