Search in sources :

Example 66 with BlogFileResource

use of org.olat.fileresource.types.BlogFileResource in project openolat by klemens.

the class FeedFileStorgeTest method getOrCreateItemMediaContainer_get.

@Test
public void getOrCreateItemMediaContainer_get() {
    BlogFileResource resource = new BlogFileResource();
    Feed feed = new FeedImpl(resource);
    Item item = new ItemImpl(feed);
    item.setGuid("guid");
    sut.getOrCreateItemMediaContainer(item);
    VFSContainer itemMediaContainer = sut.getOrCreateItemMediaContainer(item);
    assertThat(itemMediaContainer).isNotNull();
    fileResourceManager.deleteFileResource(resource);
}
Also used : Item(org.olat.modules.webFeed.Item) ItemImpl(org.olat.modules.webFeed.model.ItemImpl) VFSContainer(org.olat.core.util.vfs.VFSContainer) FeedImpl(org.olat.modules.webFeed.model.FeedImpl) BlogFileResource(org.olat.fileresource.types.BlogFileResource) Feed(org.olat.modules.webFeed.Feed) Test(org.junit.Test)

Example 67 with BlogFileResource

use of org.olat.fileresource.types.BlogFileResource in project openolat by klemens.

the class FeedFileStorgeTest method loadFeedFromXML_Ores_not_existing.

@Test
public void loadFeedFromXML_Ores_not_existing() {
    BlogFileResource resource = new BlogFileResource();
    Feed reloaded = sut.loadFeedFromXML(resource);
    assertThat(reloaded).isNull();
    fileResourceManager.deleteFileResource(resource);
}
Also used : BlogFileResource(org.olat.fileresource.types.BlogFileResource) Feed(org.olat.modules.webFeed.Feed) Test(org.junit.Test)

Example 68 with BlogFileResource

use of org.olat.fileresource.types.BlogFileResource in project openolat by klemens.

the class FeedFileStorgeTest method getOrCreateFeedMediaContainer_get.

@Test
public void getOrCreateFeedMediaContainer_get() {
    FeedFileResource ores = new BlogFileResource();
    sut.getOrCreateFeedMediaContainer(ores);
    VFSContainer feedMediaContainer = sut.getOrCreateFeedMediaContainer(ores);
    assertThat(feedMediaContainer).isNotNull();
    fileResourceManager.deleteFileResource(ores);
}
Also used : VFSContainer(org.olat.core.util.vfs.VFSContainer) FeedFileResource(org.olat.fileresource.types.FeedFileResource) BlogFileResource(org.olat.fileresource.types.BlogFileResource) Test(org.junit.Test)

Example 69 with BlogFileResource

use of org.olat.fileresource.types.BlogFileResource in project openolat by klemens.

the class FeedFileStorgeTest method getOrCreateFeedContainer_create.

@Test
public void getOrCreateFeedContainer_create() {
    FeedFileResource ores = new BlogFileResource();
    VFSContainer feedContainer = sut.getOrCreateFeedContainer(ores);
    assertThat(feedContainer).isNotNull();
    fileResourceManager.deleteFileResource(ores);
}
Also used : VFSContainer(org.olat.core.util.vfs.VFSContainer) FeedFileResource(org.olat.fileresource.types.FeedFileResource) BlogFileResource(org.olat.fileresource.types.BlogFileResource) Test(org.junit.Test)

Example 70 with BlogFileResource

use of org.olat.fileresource.types.BlogFileResource in project openolat by klemens.

the class FeedFileStorgeTest method getOrCreateItemContainer_guid_get.

@Test
public void getOrCreateItemContainer_guid_get() {
    BlogFileResource resource = new BlogFileResource();
    Feed feed = new FeedImpl(resource);
    String guid = "guid 123";
    sut.getOrCreateItemContainer(feed, guid);
    VFSContainer itemContainer = sut.getOrCreateItemContainer(feed, guid);
    assertThat(itemContainer).isNotNull();
    fileResourceManager.deleteFileResource(resource);
}
Also used : VFSContainer(org.olat.core.util.vfs.VFSContainer) FeedImpl(org.olat.modules.webFeed.model.FeedImpl) BlogFileResource(org.olat.fileresource.types.BlogFileResource) Feed(org.olat.modules.webFeed.Feed) Test(org.junit.Test)

Aggregations

BlogFileResource (org.olat.fileresource.types.BlogFileResource)74 Test (org.junit.Test)72 Feed (org.olat.modules.webFeed.Feed)60 FeedImpl (org.olat.modules.webFeed.model.FeedImpl)58 Item (org.olat.modules.webFeed.Item)38 ItemImpl (org.olat.modules.webFeed.model.ItemImpl)36 VFSContainer (org.olat.core.util.vfs.VFSContainer)34 FeedFileResource (org.olat.fileresource.types.FeedFileResource)12 File (java.io.File)2 Path (java.nio.file.Path)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 RepositoryService (org.olat.repository.RepositoryService)2 OLATResource (org.olat.resource.OLATResource)2