use of io.gravitee.management.model.NewTopApiEntity in project gravitee-management-rest-api by gravitee-io.
the class TopApiServiceTest method shouldNotCreate.
@Test(expected = IllegalArgumentException.class)
public void shouldNotCreate() {
final NewTopApiEntity topApi = new NewTopApiEntity();
topApi.setApi("api");
when(parameterService.findAll(PORTAL_TOP_APIS.getKey())).thenReturn(singletonList("api"));
topApiService.create(topApi);
}
use of io.gravitee.management.model.NewTopApiEntity in project gravitee-management-rest-api by gravitee-io.
the class TopApiServiceTest method shouldCreate.
@Test
public void shouldCreate() {
final NewTopApiEntity topApi = new NewTopApiEntity();
topApi.setApi("api");
topApiService.create(topApi);
verify(parameterService).createMultipleValue(PORTAL_TOP_APIS.getKey(), "api");
verify(parameterService).findAll(eq(PORTAL_TOP_APIS.getKey()), any(), any());
}
Aggregations