|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2018 the original author or authors.
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -16,6 +16,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure.hateoas;
|
|
|
|
package org.springframework.boot.autoconfigure.hateoas;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.After;
|
|
|
|
import org.junit.After;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
|
@ -69,8 +71,9 @@ public class HypermediaAutoConfigurationTests {
|
|
|
|
this.context.refresh();
|
|
|
|
this.context.refresh();
|
|
|
|
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
|
|
|
|
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
|
|
|
|
assertThat(discoverers).isNotNull();
|
|
|
|
assertThat(discoverers).isNotNull();
|
|
|
|
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
|
|
|
|
Optional<LinkDiscoverer> discoverer = discoverers
|
|
|
|
assertThat(discoverer).isInstanceOf(HalLinkDiscoverer.class);
|
|
|
|
.getLinkDiscovererFor(MediaTypes.HAL_JSON);
|
|
|
|
|
|
|
|
assertThat(discoverer).containsInstanceOf(HalLinkDiscoverer.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|