Search in sources :

Example 11 with I18nString

use of pl.edu.icm.unity.types.I18nString in project furms by unity-idm.

the class UnitySiteGroupDAOTest method shouldGetMetaInfoAboutSite.

@Test
void shouldGetMetaInfoAboutSite() {
    // given
    String id = UUID.randomUUID().toString();
    Group group = new Group("/path/" + id);
    group.setDisplayedName(new I18nString("test"));
    when(unityClient.get(contains(id), eq(Group.class))).thenReturn(group);
    // when
    Optional<Site> site = unitySiteWebClient.get(id);
    // then
    assertThat(site).isPresent();
    assertThat(site.get().getId()).isEqualTo(id);
    assertThat(site.get().getName()).isEqualTo("test");
}
Also used : Site(io.imunity.furms.domain.sites.Site) Group(pl.edu.icm.unity.types.basic.Group) I18nString(pl.edu.icm.unity.types.I18nString) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) I18nString(pl.edu.icm.unity.types.I18nString) Test(org.junit.jupiter.api.Test)

Aggregations

I18nString (pl.edu.icm.unity.types.I18nString)11 Group (pl.edu.icm.unity.types.basic.Group)11 Test (org.junit.jupiter.api.Test)6 CommunityGroup (io.imunity.furms.domain.communities.CommunityGroup)4 ProjectGroup (io.imunity.furms.domain.projects.ProjectGroup)3 Site (io.imunity.furms.domain.sites.Site)2 UnityFailureException (io.imunity.furms.spi.exceptions.UnityFailureException)2 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)2 WebClientResponseException (org.springframework.web.reactive.function.client.WebClientResponseException)2