Search in sources :

Example 1 with FileSystemFolderSearchTerm

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

the class Test_FileSystemFolder method getDescription.

@Test
public void getDescription() {
    FileSystemFolder folder = (FileSystemFolder) storage.getFolder(new FileSystemFolderSearchTerm(path, null, true, false));
    assertEquals("File system folder '" + path + "' on the local machine", folder.getDescription());
}
Also used : FileSystemFolder(com.axway.ats.rbv.filesystem.FileSystemFolder) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 2 with FileSystemFolderSearchTerm

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

the class Test_FileSystemFolder method close.

@Test
public void close() throws Exception {
    expectNew(SystemOperations.class, "localhost:0000").andReturn(systemOperations);
    expect(systemOperations.getOperatingSystemType()).andReturn(OperatingSystemType.LINUX);
    replayAll();
    FileSystemFolder folder = (FileSystemFolder) storage.getFolder(new FileSystemFolderSearchTerm(path, null, true, false));
    folder.open();
    folder.close();
    verifyAll();
}
Also used : FileSystemOperations(com.axway.ats.action.filesystem.FileSystemOperations) SystemOperations(com.axway.ats.action.system.SystemOperations) FileSystemFolder(com.axway.ats.rbv.filesystem.FileSystemFolder) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 3 with FileSystemFolderSearchTerm

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

the class Test_FileSystemFolder method getMetaDataCountsNegativeFolderNotOpen.

@Test(expected = MatchableNotOpenException.class)
public void getMetaDataCountsNegativeFolderNotOpen() throws Exception {
    FileSystemFolder folder = (FileSystemFolder) storage.getFolder(new FileSystemFolderSearchTerm(path, null, true, false));
    folder.getMetaDataCounts();
}
Also used : FileSystemFolder(com.axway.ats.rbv.filesystem.FileSystemFolder) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 4 with FileSystemFolderSearchTerm

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

the class Test_FileSystemFolderSearchTerm method constructorWithFolder.

@Test
public void constructorWithFolder() {
    FileSystemFolderSearchTerm searchTerm = new FileSystemFolderSearchTerm("/test/", null, true, false);
    assertEquals("/test/", searchTerm.getPath());
    assertEquals(false, searchTerm.isIncludeDirs());
}
Also used : FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 5 with FileSystemFolderSearchTerm

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

the class Test_FileSystemFolder method openNegativeInvalidPath.

@Test
public void openNegativeInvalidPath() throws Exception {
    expectNew(SystemOperations.class, "localhost:0000").andReturn(systemOperations);
    expect(systemOperations.getOperatingSystemType()).andReturn(OperatingSystemType.LINUX);
    replayAll();
    //should pass - only warning should be logged
    FileSystemFolder folder = (FileSystemFolder) storage.getFolder(new FileSystemFolderSearchTerm(";;;", null, true));
    folder.open();
    verifyAll();
}
Also used : FileSystemOperations(com.axway.ats.action.filesystem.FileSystemOperations) SystemOperations(com.axway.ats.action.system.SystemOperations) FileSystemFolder(com.axway.ats.rbv.filesystem.FileSystemFolder) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

BaseTest (com.axway.ats.rbv.BaseTest)16 FileSystemFolderSearchTerm (com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm)16 Test (org.junit.Test)16 FileSystemFolder (com.axway.ats.rbv.filesystem.FileSystemFolder)12 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)12 FileSystemOperations (com.axway.ats.action.filesystem.FileSystemOperations)5 SystemOperations (com.axway.ats.action.system.SystemOperations)5 FileSystemStorage (com.axway.ats.rbv.filesystem.FileSystemStorage)3 MetaData (com.axway.ats.rbv.MetaData)1 FileSystemMetaData (com.axway.ats.rbv.filesystem.FileSystemMetaData)1 RbvStorageException (com.axway.ats.rbv.model.RbvStorageException)1