Commit add8c6f2 authored by Andy Wilkinson's avatar Andy Wilkinson

Align HypermediaAutoConfigurationTests with latest HATEOAS API changes

See gh-15939
parent b28c31d6
/*
* 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");
* you may not use this file except in compliance with the License.
......@@ -16,6 +16,8 @@
package org.springframework.boot.autoconfigure.hateoas;
import java.util.Optional;
import org.junit.After;
import org.junit.Test;
......@@ -69,8 +71,9 @@ public class HypermediaAutoConfigurationTests {
this.context.refresh();
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
assertThat(discoverers).isNotNull();
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
assertThat(discoverer).isInstanceOf(HalLinkDiscoverer.class);
Optional<LinkDiscoverer> discoverer = discoverers
.getLinkDiscovererFor(MediaTypes.HAL_JSON);
assertThat(discoverer).containsInstanceOf(HalLinkDiscoverer.class);
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment