use of io.gravitee.rest.api.model.PageEntity in project gravitee-management-rest-api by gravitee-io.
the class ApiQualityMetricFunctionalDocumentationTest method shouldBeValidWithMarkdownPublished.
@Test
public void shouldBeValidWithMarkdownPublished() {
PageEntity item = mock(PageEntity.class);
when(mockPageService.search(any(), eq(GraviteeContext.getCurrentEnvironment()))).thenReturn(Collections.singletonList(item));
ApiEntity api = mock(ApiEntity.class);
when(api.getId()).thenReturn(API_ID);
boolean valid = srv.isValid(api);
assertTrue(valid);
}
use of io.gravitee.rest.api.model.PageEntity in project gravitee-management-rest-api by gravitee-io.
the class ApiQualityMetricTechnicalDocumentationTest method shouldBeValidWithSwaggerPublished.
@Test
public void shouldBeValidWithSwaggerPublished() {
PageEntity item = mock(PageEntity.class);
when(mockPageService.search(any(), eq(GraviteeContext.getCurrentEnvironment()))).thenReturn(Collections.singletonList(item));
ApiEntity api = mock(ApiEntity.class);
when(api.getId()).thenReturn(API_ID);
boolean valid = srv.isValid(api);
assertTrue(valid);
}
Aggregations