use of io.gravitee.rest.api.model.UpdateEntryPointEntity in project gravitee-management-rest-api by gravitee-io.
the class EntrypointServiceTest method shouldNotUpdate.
@Test(expected = EntrypointNotFoundException.class)
public void shouldNotUpdate() {
final UpdateEntryPointEntity entrypoint = new UpdateEntryPointEntity();
entrypoint.setId(UNKNOWN_ID);
entrypointService.update(entrypoint, REFERENCE_ID, REFERENCE_TYPE);
}
use of io.gravitee.rest.api.model.UpdateEntryPointEntity in project gravitee-management-rest-api by gravitee-io.
the class EntrypointServiceTest method shouldUpdate.
@Test
public void shouldUpdate() {
final UpdateEntryPointEntity entrypoint = new UpdateEntryPointEntity();
entrypoint.setId(ID);
entrypoint.setValue(NEW_VALUE);
entrypoint.setTags(NEW_TAGS);
final EntrypointEntity entrypointEntity = entrypointService.update(entrypoint, REFERENCE_ID, REFERENCE_TYPE);
assertEquals(ID, entrypointEntity.getId());
assertEquals(NEW_VALUE, entrypointEntity.getValue());
assertNotNull(entrypointEntity.getTags());
assertEquals(2, entrypointEntity.getTags().length);
}
use of io.gravitee.rest.api.model.UpdateEntryPointEntity in project gravitee-management-rest-api by gravitee-io.
the class EntrypointServiceTest method shouldUpdateWithSameTags.
@Test
public void shouldUpdateWithSameTags() throws Exception {
final UpdateEntryPointEntity entrypoint = new UpdateEntryPointEntity();
entrypoint.setId(ID);
entrypoint.setValue(NEW_VALUE);
entrypoint.setTags(TAGS);
final EntrypointEntity entrypointEntity = entrypointService.update(entrypoint, REFERENCE_ID, REFERENCE_TYPE);
assertEquals(ID, entrypointEntity.getId());
assertEquals(NEW_VALUE, entrypointEntity.getValue());
assertNotNull(entrypointEntity.getTags());
assertEquals(2, entrypointEntity.getTags().length);
}
Aggregations