Search in sources :

Example 6 with ForumArtefact

use of org.olat.modules.fo.portfolio.ForumArtefact in project openolat by klemens.

the class EPArtefactManagerTest method testCreateForumArtefactAlternateVersion.

@Test
public void testCreateForumArtefactAlternateVersion() {
    AbstractArtefact artefact = epFrontendManager.createAndPersistArtefact(ident1, "Forum");
    assertNotNull(artefact);
    assertTrue(artefact instanceof ForumArtefact);
    dbInstance.commitAndCloseSession();
    assertNotNull(artefact.getKey());
    // reload the artefact
    AbstractArtefact persistedArtefact = epFrontendManager.loadArtefactByKey(artefact.getKey());
    assertNotNull(persistedArtefact);
    assertTrue(persistedArtefact instanceof ForumArtefact);
}
Also used : ForumArtefact(org.olat.modules.fo.portfolio.ForumArtefact) AbstractArtefact(org.olat.portfolio.model.artefacts.AbstractArtefact) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 ForumArtefact (org.olat.modules.fo.portfolio.ForumArtefact)6 AbstractArtefact (org.olat.portfolio.model.artefacts.AbstractArtefact)6 LocalFolderImpl (org.olat.core.util.vfs.LocalFolderImpl)2 VFSContainer (org.olat.core.util.vfs.VFSContainer)2 PortfolioStructure (org.olat.portfolio.model.structel.PortfolioStructure)2