Search in sources :

Example 1 with PromotionEntityAuthor

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

the class GoodbyeCommandHandlerTest method getAPromotionEntity.

private PromotionEntity getAPromotionEntity(String id) {
    final PromotionEntity promotion = new PromotionEntity();
    promotion.setApiDefinition("{\"id\" : \"api#1\",\"name\" : \"API Name\",\"version\" : \"1\",\"proxy\" : {  \"context_path\" : \"/product\",  \"endpoint\" : \"http://toto.com\",  \"endpoints\" : [ {    \"target\" : \"http://toto.com\",    \"weight\" : 1,    \"name\" : \"endpointName\"  } ],  \"strip_context_path\" : false,  \"http\" : {    \"configuration\" : {      \"connectTimeout\" : 5000,      \"idleTimeout\" : 60000,      \"keepAlive\" : true,      \"dumpRequest\" : false    }  }},\"paths\" : {  \"/\" : [ {    \"methods\" : [ ],    \"api-key\" : {}  } ]},\"tags\" : [ ]\n}");
    promotion.setTargetEnvCockpitId("env#1-cockpit-id");
    promotion.setTargetEnvName("Target Env");
    promotion.setSourceEnvCockpitId("env#2-cockpit-id");
    promotion.setSourceEnvName("Source Env");
    promotion.setApiId("api id");
    promotion.setTargetApiId("target api id");
    promotion.setStatus(PromotionEntityStatus.TO_BE_VALIDATED);
    promotion.setId(id);
    PromotionEntityAuthor author = new PromotionEntityAuthor();
    author.setDisplayName("Author");
    author.setEmail("author@gv.io");
    author.setPicture("https://picture.png");
    promotion.setAuthor(author);
    return promotion;
}
Also used : PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor)

Example 2 with PromotionEntityAuthor

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

the class PromotionTasksServiceImplTest method getAPromotionEntity.

private PromotionEntity getAPromotionEntity() {
    final PromotionEntity promotion = new PromotionEntity();
    promotion.setApiDefinition("{\"id\" : \"api#1\",\"name\" : \"API Name\",\"version\" : \"1\",\"proxy\" : {  \"context_path\" : \"/product\",  \"endpoint\" : \"http://toto.com\",  \"endpoints\" : [ {    \"target\" : \"http://toto.com\",    \"weight\" : 1,    \"name\" : \"endpointName\"  } ],  \"strip_context_path\" : false,  \"http\" : {    \"configuration\" : {      \"connectTimeout\" : 5000,      \"idleTimeout\" : 60000,      \"keepAlive\" : true,      \"dumpRequest\" : false    }  }},\"paths\" : {  \"/\" : [ {    \"methods\" : [ ],    \"api-key\" : {}  } ]},\"tags\" : [ ]\n}");
    promotion.setTargetEnvCockpitId("env#1-cockpit-id");
    promotion.setTargetEnvName("Target Env");
    promotion.setSourceEnvCockpitId("env#2-cockpit-id");
    promotion.setSourceEnvName("Source Env");
    promotion.setApiId("api id");
    promotion.setTargetApiId("target api id");
    PromotionEntityAuthor author = new PromotionEntityAuthor();
    author.setDisplayName("Author");
    author.setEmail("author@gv.io");
    author.setPicture("https://picture.png");
    promotion.setAuthor(author);
    return promotion;
}
Also used : PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor)

Aggregations

PromotionEntity (io.gravitee.rest.api.model.promotion.PromotionEntity)2 PromotionEntityAuthor (io.gravitee.rest.api.model.promotion.PromotionEntityAuthor)2