use of org.pentaho.di.plugins.fileopensave.providers.recents.model.RecentFile in project pentaho-kettle by pentaho.
the class RecentUtilsTest method setPathsRepositoryTest.
@Test
public void setPathsRepositoryTest() {
LastUsedFile lastUsedFile = new LastUsedFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, "file", "/home/admin", true, "repo", "admin", true, 1, new Date(), "");
RecentFile recentFile = new RecentFile();
RecentUtils.setPaths(lastUsedFile, recentFile);
Assert.assertEquals("file", recentFile.getName());
Assert.assertEquals("/home/admin", recentFile.getParent());
Assert.assertEquals("/home/admin/file", recentFile.getPath());
Assert.assertEquals("repo", recentFile.getRepository());
Assert.assertEquals("admin", recentFile.getUsername());
}
use of org.pentaho.di.plugins.fileopensave.providers.recents.model.RecentFile in project pentaho-kettle by pentaho.
the class RecentUtilsTest method setPathsVFSTest.
@Test
public void setPathsVFSTest() {
LastUsedFile lastUsedFile = new LastUsedFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, PVFS_PATH, null, false, null, null, false, 1, new Date(), NAMED_CONNECTION);
RecentFile recentFile = new RecentFile();
RecentUtils.setPaths(lastUsedFile, recentFile);
Assert.assertEquals(PVFS_FILENAME, recentFile.getName());
Assert.assertEquals(PVFS_PARENT, recentFile.getParent());
Assert.assertEquals(PVFS_PATH, recentFile.getPath());
}
use of org.pentaho.di.plugins.fileopensave.providers.recents.model.RecentFile in project pentaho-kettle by pentaho.
the class RecentUtilsTest method setPathsUnixTest.
@Test
public void setPathsUnixTest() {
LastUsedFile lastUsedFile = new LastUsedFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, UNIX_PATH, null, false, null, null, false, 1, new Date(), null);
RecentFile recentFile = new RecentFile();
RecentUtils.setPaths(lastUsedFile, recentFile);
Assert.assertEquals(UNIX_FILENAME, recentFile.getName());
Assert.assertEquals(UNIX_PARENT, recentFile.getParent());
Assert.assertEquals(UNIX_PATH, recentFile.getPath());
}
use of org.pentaho.di.plugins.fileopensave.providers.recents.model.RecentFile in project pentaho-kettle by pentaho.
the class RecentUtilsTest method setPathsWindowsTest.
@Test
public void setPathsWindowsTest() {
LastUsedFile lastUsedFile = new LastUsedFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, WINDOWS_PATH, null, false, null, null, false, 1, new Date(), null);
RecentFile recentFile = new RecentFile();
RecentUtils.setPaths(lastUsedFile, recentFile);
Assert.assertEquals(WINDOWS_FILENAME, recentFile.getName());
Assert.assertEquals(WINDOWS_PARENT, recentFile.getParent());
Assert.assertEquals(WINDOWS_PATH, recentFile.getPath());
}
Aggregations