use of org.springframework.hateoas.LinkDiscoverer in project spring-boot by spring-projects.
the class HypermediaAutoConfigurationTests method linkDiscoverersCreated.
@Test
public void linkDiscoverersCreated() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(BaseConfig.class);
this.context.refresh();
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
assertThat(discoverers).isNotNull();
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
assertThat(HalLinkDiscoverer.class.isInstance(discoverer)).isTrue();
}
Aggregations