Search in sources :

Example 6 with EntrypointEntity

use of io.gravitee.rest.api.model.EntrypointEntity 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);
}
Also used : UpdateEntryPointEntity(io.gravitee.rest.api.model.UpdateEntryPointEntity) EntrypointEntity(io.gravitee.rest.api.model.EntrypointEntity) Test(org.junit.Test)

Aggregations

EntrypointEntity (io.gravitee.rest.api.model.EntrypointEntity)6 Test (org.junit.Test)3 TechnicalException (io.gravitee.repository.exceptions.TechnicalException)2 Entrypoint (io.gravitee.repository.management.model.Entrypoint)2 UpdateEntryPointEntity (io.gravitee.rest.api.model.UpdateEntryPointEntity)2 TechnicalManagementException (io.gravitee.rest.api.service.exceptions.TechnicalManagementException)2 NewEntryPointEntity (io.gravitee.rest.api.model.NewEntryPointEntity)1 EntrypointNotFoundException (io.gravitee.rest.api.service.exceptions.EntrypointNotFoundException)1