Search in sources :

Example 1 with ImmutableBookmark

use of org.finos.waltz.model.bookmark.ImmutableBookmark in project waltz by khartec.

the class BookmarkServiceTest method bookmarksCanBeUpdated.

@Test
public void bookmarksCanBeUpdated() {
    EntityReference bookmarkedEntity = mkAppRef();
    Bookmark bookmark = createBookmark(bookmarkedEntity, "test bookmark1");
    Long bookmarkId = bookmark.id().get();
    assertEquals(bookmark, svc.getById(bookmarkId));
    ImmutableBookmark updatedBookmark = ImmutableBookmark.copyOf(bookmark).withTitle("Updated").withLastUpdatedAt(DateTimeUtilities.today().atStartOfDay().plusHours(1));
    svc.update(updatedBookmark, "admin");
    assertEquals(updatedBookmark, svc.getById(bookmarkId));
}
Also used : Bookmark(org.finos.waltz.model.bookmark.Bookmark) ImmutableBookmark(org.finos.waltz.model.bookmark.ImmutableBookmark) ImmutableBookmark(org.finos.waltz.model.bookmark.ImmutableBookmark) EntityReference(org.finos.waltz.model.EntityReference) BaseInMemoryIntegrationTest(org.finos.waltz.integration_test.inmem.BaseInMemoryIntegrationTest) Test(org.junit.jupiter.api.Test)

Aggregations

BaseInMemoryIntegrationTest (org.finos.waltz.integration_test.inmem.BaseInMemoryIntegrationTest)1 EntityReference (org.finos.waltz.model.EntityReference)1 Bookmark (org.finos.waltz.model.bookmark.Bookmark)1 ImmutableBookmark (org.finos.waltz.model.bookmark.ImmutableBookmark)1 Test (org.junit.jupiter.api.Test)1