|
29 | 29 | import io.gravitee.cockpit.api.command.v1.designer.DeployModelReply; |
30 | 30 | import io.gravitee.definition.model.DefinitionVersion; |
31 | 31 | import io.gravitee.exchange.api.command.CommandStatus; |
| 32 | +import io.gravitee.repository.management.model.Api; |
32 | 33 | import io.gravitee.rest.api.model.EnvironmentEntity; |
33 | 34 | import io.gravitee.rest.api.model.UserEntity; |
34 | 35 | import io.gravitee.rest.api.model.api.ApiEntity; |
@@ -105,8 +106,8 @@ public void updates_an_API_DOCUMENTED() { |
105 | 106 |
|
106 | 107 | String apiId = "api#id"; |
107 | 108 | when(apiSearchService.findIdByEnvironmentIdAndCrossId(ENVIRONMENT_ID, payload.modelId())).thenReturn(Optional.of(apiId)); |
108 | | - when(apiSearchService.findById(EXECUTION_CONTEXT, apiId)).thenReturn( |
109 | | - io.gravitee.rest.api.model.v4.api.ApiEntity.builder().definitionVersion(DefinitionVersion.V2).build() |
| 109 | + when(apiSearchService.findRepositoryApiById(EXECUTION_CONTEXT, apiId)).thenReturn( |
| 110 | + Api.builder().definitionVersion(DefinitionVersion.V2).build() |
110 | 111 | ); |
111 | 112 |
|
112 | 113 | UserEntity user = createUserEntity(payload); |
@@ -146,8 +147,8 @@ public void updates_an_API_MOCKED_mode() { |
146 | 147 |
|
147 | 148 | String apiId = "api#id"; |
148 | 149 | when(apiSearchService.findIdByEnvironmentIdAndCrossId(ENVIRONMENT_ID, payload.modelId())).thenReturn(Optional.of(apiId)); |
149 | | - when(apiSearchService.findById(EXECUTION_CONTEXT, apiId)).thenReturn( |
150 | | - io.gravitee.rest.api.model.v4.api.ApiEntity.builder().definitionVersion(DefinitionVersion.V2).build() |
| 150 | + when(apiSearchService.findRepositoryApiById(EXECUTION_CONTEXT, apiId)).thenReturn( |
| 151 | + Api.builder().definitionVersion(DefinitionVersion.V2).build() |
151 | 152 | ); |
152 | 153 |
|
153 | 154 | UserEntity user = createUserEntity(payload); |
@@ -187,8 +188,8 @@ public void updates_an_API_PUBLISHED_mode() { |
187 | 188 |
|
188 | 189 | String apiId = "api#id"; |
189 | 190 | when(apiSearchService.findIdByEnvironmentIdAndCrossId(ENVIRONMENT_ID, payload.modelId())).thenReturn(Optional.of(apiId)); |
190 | | - when(apiSearchService.findById(EXECUTION_CONTEXT, apiId)).thenReturn( |
191 | | - io.gravitee.rest.api.model.v4.api.ApiEntity.builder().definitionVersion(DefinitionVersion.V2).build() |
| 191 | + when(apiSearchService.findRepositoryApiById(EXECUTION_CONTEXT, apiId)).thenReturn( |
| 192 | + Api.builder().definitionVersion(DefinitionVersion.V2).build() |
192 | 193 | ); |
193 | 194 |
|
194 | 195 | UserEntity user = createUserEntity(payload); |
|
0 commit comments