Search in sources :

Example 26 with PrimaryOwnerEntity

use of io.gravitee.rest.api.model.PrimaryOwnerEntity in project gravitee-management-rest-api by gravitee-io.

the class MetadataServiceTest method checkMetadataFormat_nominalCase_EL.

@Test
public void checkMetadataFormat_nominalCase_EL() {
    UserEntity userEntity = new UserEntity();
    userEntity.setEmail("gs@support.com");
    PrimaryOwnerEntity primaryOwnerEntity = new PrimaryOwnerEntity(userEntity);
    ApiEntity apiEntity = new ApiEntity();
    apiEntity.setPrimaryOwner(primaryOwnerEntity);
    metadataService.checkMetadataFormat(MetadataFormat.MAIL, "${api.primaryOwner.email}", API, apiEntity);
}
Also used : PrimaryOwnerEntity(io.gravitee.rest.api.model.PrimaryOwnerEntity) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) UserEntity(io.gravitee.rest.api.model.UserEntity) Test(org.junit.Test)

Aggregations

PrimaryOwnerEntity (io.gravitee.rest.api.model.PrimaryOwnerEntity)26 Test (org.junit.Test)23 JsonNode (com.fasterxml.jackson.databind.JsonNode)16 UserEntity (io.gravitee.rest.api.model.UserEntity)9 ApiEntity (io.gravitee.rest.api.model.api.ApiEntity)8 ApplicationEntity (io.gravitee.rest.api.model.ApplicationEntity)3 ApplicationListItem (io.gravitee.rest.api.model.application.ApplicationListItem)3 Assert (org.junit.Assert)3 Before (org.junit.Before)3 Mockito (org.mockito.Mockito)3 NOT_FOUND_404 (io.gravitee.common.http.HttpStatusCode.NOT_FOUND_404)2 OK_200 (io.gravitee.common.http.HttpStatusCode.OK_200)2 Proxy (io.gravitee.definition.model.Proxy)2 VirtualHost (io.gravitee.definition.model.VirtualHost)2 RatingSummaryEntity (io.gravitee.rest.api.model.RatingSummaryEntity)2 SubscriptionEntity (io.gravitee.rest.api.model.SubscriptionEntity)2 TopHitsAnalytics (io.gravitee.rest.api.model.analytics.TopHitsAnalytics)2 GroupByQuery (io.gravitee.rest.api.model.analytics.query.GroupByQuery)2 ApiEntrypointEntity (io.gravitee.rest.api.model.api.ApiEntrypointEntity)2 ApiQuery (io.gravitee.rest.api.model.api.ApiQuery)2