use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithModTimeExpectTrueNegative.
@Test
public void isMatchConstructWithModTimeExpectTrueNegative() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(123l, "isMatchConstructWithModTimeExpectTrueNegative", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithModTimeExpectTrueNegativeWrongFile.
@Test
public void isMatchConstructWithModTimeExpectTrueNegativeWrongFile() throws Exception {
expect(pack.getModTime()).andReturn(123L);
replayAll();
FileModtimeRule rule = new FileModtimeRule(modtime, "isMatchConstructWithModTimeExpectTrueNegativeWrongFile", true);
MetaData metaData = new FileSystemMetaData(pack);
assertFalse(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method constructorWithMachineNullMachine.
@Test
public void constructorWithMachineNullMachine() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(null, testFilePath, "constructorWithMachineNullMachine", true);
assertTrue(rule != null);
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithModTimeExpectTruePositive.
@Test
public void isMatchConstructWithModTimeExpectTruePositive() throws Exception {
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(modtime, "isMatchConstructWithModTimeExpectTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
use of com.axway.ats.rbv.filesystem.rules.FileModtimeRule in project ats-framework by Axway.
the class Test_FileModtimeRule method isMatchConstructWithFileExpectTruePositive.
@Test
public void isMatchConstructWithFileExpectTruePositive() throws Exception {
expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
expect(pack.getModTime()).andReturn(modtime);
expect(pack.getModTime()).andReturn(modtime);
replayAll();
FileModtimeRule rule = new FileModtimeRule(null, testFilePath, "isMatchConstructWithFileExpectTruePositive", true);
MetaData metaData = new FileSystemMetaData(pack);
assertTrue(rule.isMatch(metaData));
verifyAll();
}
Aggregations