Search in sources :

Example 6 with FileModtimeRule

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

the class FileSystemVerification method checkModificationTimeDifferent.

/**
 * Add rule to check that the last modification time of the received file is different
 * than the given one
 *
 *  @param modTime
 */
@PublicAtsApi
public void checkModificationTimeDifferent(long modTime) {
    FileModtimeRule rule = new FileModtimeRule(modTime, "checkModificationTimeDifferent", false);
    rootRule.addRule(rule);
}
Also used : FileModtimeRule(com.axway.ats.rbv.filesystem.rules.FileModtimeRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 7 with FileModtimeRule

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

the class FileSystemVerification method checkModificationTime.

/**
 * Add rule to check that the last modification time of the received file is the same
 * as the last modification time of the source file
 *
 * @param srcAtsAgent       the remote ATS agent address on which the source file is located
 * @param srcFile           the full name of the file
 * @throws RbvException     thrown on error
 */
@PublicAtsApi
public void checkModificationTime(String srcAtsAgent, String srcFile) throws RbvException {
    FileModtimeRule rule = new FileModtimeRule(srcAtsAgent, srcFile, "checkModificationTime", true);
    rootRule.addRule(rule);
}
Also used : FileModtimeRule(com.axway.ats.rbv.filesystem.rules.FileModtimeRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 8 with FileModtimeRule

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

the class FileSystemVerification method checkModificationTime.

/**
 * Add rule to check that the last modification time of the received file is the same
 * as the given one
 *
 *  @param modTime
 */
@PublicAtsApi
public void checkModificationTime(long modTime) {
    FileModtimeRule rule = new FileModtimeRule(modTime, "checkModificationTime", true);
    rootRule.addRule(rule);
}
Also used : FileModtimeRule(com.axway.ats.rbv.filesystem.rules.FileModtimeRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 9 with FileModtimeRule

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

the class FileSystemVerification method checkModificationTimeDifferent.

/**
 * Add rule to check that the last modification time of the received file is different
 * than the last modification time of the source file
 *
 * @param srcAtsAgent       the remote ATS agent address on which the source file is located
 * @param srcFile           the full name of the file
 * @throws RbvException     thrown on error
 */
@PublicAtsApi
public void checkModificationTimeDifferent(String srcAtsAgent, String srcFile) throws RbvException {
    FileModtimeRule rule = new FileModtimeRule(srcAtsAgent, srcFile, "checkModificationTimeDifferent", false);
    rootRule.addRule(rule);
}
Also used : FileModtimeRule(com.axway.ats.rbv.filesystem.rules.FileModtimeRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 10 with FileModtimeRule

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

the class Test_FileModtimeRule method constructorWithMachine.

@Test
public void constructorWithMachine() throws Exception {
    expectNew(FilePackage.class, null, null, testFilePath).andReturn(pack);
    expect(pack.getModTime()).andReturn(modtime);
    replayAll();
    FileModtimeRule rule = new FileModtimeRule(null, testFilePath, "constructorWithMachine", true);
    assertTrue(rule != null);
    verifyAll();
}
Also used : FilePackage(com.axway.ats.action.objects.FilePackage) FileModtimeRule(com.axway.ats.rbv.filesystem.rules.FileModtimeRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

FileModtimeRule (com.axway.ats.rbv.filesystem.rules.FileModtimeRule)13 BaseTest (com.axway.ats.rbv.BaseTest)9 Test (org.junit.Test)9 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)9 MetaData (com.axway.ats.rbv.MetaData)6 FileSystemMetaData (com.axway.ats.rbv.filesystem.FileSystemMetaData)6 FilePackage (com.axway.ats.action.objects.FilePackage)4 PublicAtsApi (com.axway.ats.common.PublicAtsApi)4