Search in sources :

Example 1 with ExportManifestEntity

use of org.pentaho.platform.plugin.services.importexport.exportManifest.ExportManifestEntity in project pentaho-platform by pentaho.

the class ImportSessionTest method fileHiddenPropertyIsDefinedWhenAclIsEnabled.

@Test
public void fileHiddenPropertyIsDefinedWhenAclIsEnabled() {
    importSession.setAclProperties(true, false, false);
    RepositoryFile virtualFile = mock(RepositoryFile.class);
    when(virtualFile.isHidden()).thenReturn(Boolean.TRUE);
    ExportManifestEntity fake = mock(ExportManifestEntity.class);
    when(fake.getRepositoryFile()).thenReturn(virtualFile);
    ExportManifest manifest = mock(ExportManifest.class);
    when(manifest.getExportManifestEntity(PATH)).thenReturn(fake);
    importSession.setManifest(manifest);
    assertEquals(virtualFile.isHidden(), importSession.isFileHidden(PATH));
}
Also used : ExportManifestEntity(org.pentaho.platform.plugin.services.importexport.exportManifest.ExportManifestEntity) RepositoryFile(org.pentaho.platform.api.repository2.unified.RepositoryFile) ExportManifest(org.pentaho.platform.plugin.services.importexport.exportManifest.ExportManifest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 RepositoryFile (org.pentaho.platform.api.repository2.unified.RepositoryFile)1 ExportManifest (org.pentaho.platform.plugin.services.importexport.exportManifest.ExportManifest)1 ExportManifestEntity (org.pentaho.platform.plugin.services.importexport.exportManifest.ExportManifestEntity)1