use of org.talend.dataprep.api.folder.FolderContentType in project data-prep by Talend.
the class FileSystemUtilsTest method matches_entryDoesNotMatch.
@Test
public void matches_entryDoesNotMatch() throws Exception {
Path testEntry = testFolder.resolve("testEntry");
String contentId = "contentId";
String folderId = "folderId";
FolderContentType contentType = FolderContentType.PREPARATION;
createEntry(testEntry, contentId, folderId, contentType);
// test read
assertFalse(FileSystemUtils.matches(testEntry, "other id", contentType));
}
use of org.talend.dataprep.api.folder.FolderContentType in project data-prep by Talend.
the class FileSystemUtilsTest method toFolderEntry.
@Test
public void toFolderEntry() throws Exception {
Path testEntry = testFolder.resolve("testEntry");
String contentId = "contentId";
String folderId = "folderId";
FolderContentType contentType = FolderContentType.PREPARATION;
createEntry(testEntry, contentId, folderId, contentType);
FolderEntry folderEntry = FileSystemUtils.toFolderEntry(testEntry);
assertNotNull(folderEntry);
assertEquals(contentId, folderEntry.getContentId());
assertEquals(folderId, folderEntry.getFolderId());
assertEquals(contentType, folderEntry.getContentType());
}
use of org.talend.dataprep.api.folder.FolderContentType in project data-prep by Talend.
the class FileSystemUtilsTest method matches_entryMatches.
@Test
public void matches_entryMatches() throws Exception {
Path testEntry = testFolder.resolve("testEntry");
String contentId = "contentId";
String folderId = "folderId";
FolderContentType contentType = FolderContentType.PREPARATION;
createEntry(testEntry, contentId, folderId, contentType);
// test read
assertTrue(FileSystemUtils.matches(testEntry, contentId, contentType));
}
Aggregations