Search in sources :

Example 1 with FileSystemStorage

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

the class Test_FileSystemStorage method getFolderDoNotIncludeSubdirs.

@Test
public void getFolderDoNotIncludeSubdirs() {
    FileSystemStorage storage = new FileSystemStorage();
    assertNotNull(storage.getFolder(new FileSystemFolderSearchTerm("/", null, true, false)));
}
Also used : FileSystemStorage(com.axway.ats.rbv.filesystem.FileSystemStorage) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 2 with FileSystemStorage

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

the class Test_FileSystemFolder method openNegativeInvalidHost.

@Test(expected = InvalidInputArgumentsException.class)
public void openNegativeInvalidHost() throws Exception {
    expectNew(SystemOperations.class, "invalid hosttt").andThrow(new RbvStorageException("Could not open File system folder '/tmp/test/' on server 'invalid hosttt'"));
    replayAll();
    FileSystemStorage invalidStorage = new FileSystemStorage("invalid hosttt");
    FileSystemFolder folder = (FileSystemFolder) invalidStorage.getFolder(new FileSystemFolderSearchTerm(path, null, true));
    folder.open();
    verifyAll();
}
Also used : FileSystemOperations(com.axway.ats.action.filesystem.FileSystemOperations) SystemOperations(com.axway.ats.action.system.SystemOperations) FileSystemStorage(com.axway.ats.rbv.filesystem.FileSystemStorage) RbvStorageException(com.axway.ats.rbv.model.RbvStorageException) 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 FileSystemStorage

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

the class Test_FileSystemFolder method setUpTest_FileSystemFolder.

@Before
public void setUpTest_FileSystemFolder() throws Exception {
    fileSystemOperations = createMock(FileSystemOperations.class);
    systemOperations = createMock(SystemOperations.class);
    storage = new FileSystemStorage();
}
Also used : FileSystemOperations(com.axway.ats.action.filesystem.FileSystemOperations) SystemOperations(com.axway.ats.action.system.SystemOperations) FileSystemStorage(com.axway.ats.rbv.filesystem.FileSystemStorage) FileSystemOperations(com.axway.ats.action.filesystem.FileSystemOperations) Before(org.junit.Before)

Example 4 with FileSystemStorage

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

the class Test_FileSystemStorage method getFolder.

@Test
public void getFolder() {
    FileSystemStorage storage = new FileSystemStorage("localhost:0000");
    assertNotNull(storage.getFolder(new FileSystemFolderSearchTerm("/", null, true)));
}
Also used : FileSystemStorage(com.axway.ats.rbv.filesystem.FileSystemStorage) FileSystemFolderSearchTerm(com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

FileSystemStorage (com.axway.ats.rbv.filesystem.FileSystemStorage)4 BaseTest (com.axway.ats.rbv.BaseTest)3 FileSystemFolderSearchTerm (com.axway.ats.rbv.filesystem.FileSystemFolderSearchTerm)3 Test (org.junit.Test)3 FileSystemOperations (com.axway.ats.action.filesystem.FileSystemOperations)2 SystemOperations (com.axway.ats.action.system.SystemOperations)2 FileSystemFolder (com.axway.ats.rbv.filesystem.FileSystemFolder)1 RbvStorageException (com.axway.ats.rbv.model.RbvStorageException)1 Before (org.junit.Before)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1