use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchInvalidMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchInvalidMetaDataContent() throws Exception {
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(100l, "isMatchInvalidMetaDataContent", true);
MetaData metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithFileExpectFalseNegative.
@Test
public void isMatchConstructWithFileExpectFalseNegative() throws Exception {
expectNew(FilePackage.class, null, null, testPath).andReturn(pack);
expect(pack.getSize()).andReturn(100l).times(2);
replayAll();
FileSizeRule rule = new FileSizeRule(null, testPath, "isMatchConstructWithFileExpectFalseNegative", false);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithSizeExpectFalseNegative.
@Test
public void isMatchConstructWithSizeExpectFalseNegative() throws Exception {
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(100l, "isMatchConstructWithSizeExpectFalseNegative", false);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchNullMetaDataContent.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchNullMetaDataContent() throws Exception {
expect(pack.getSize()).andReturn(100l);
replayAll();
FileSizeRule rule = new FileSizeRule(100l, "isMatchNullMetaDataContent", true);
MetaData metaData = new FileSystemMetaData(null);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.MetaData in project ats-framework by Axway.
the class Test_FileSizeRule method isMatchConstructWithFilePositive.
@Test
public void isMatchConstructWithFilePositive() throws Exception {
expectNew(FilePackage.class, null, null, testPath).andReturn(pack);
expect(pack.getSize()).andReturn(100l).times(2);
replayAll();
FileSizeRule rule = new FileSizeRule(null, testPath, "isMatchConstructWithFilePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations