Commit 97874a07 authored by Stephane Nicoll's avatar Stephane Nicoll

Fix build failure

parent f28e3d54
......@@ -28,6 +28,8 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.AnnotationConfigurationException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.Matchers.containsString;
/**
* Tests for {@link TestEntityScan}.
......@@ -77,9 +79,11 @@ public class TestEntityScanTests {
@Test
public void valueAndBasePackagesThrows() throws Exception {
this.thrown.expect(AnnotationConfigurationException.class);
this.thrown.expectMessage("attribute 'value' and its alias 'basePackages' are declared");
this.thrown.expectMessage("com.mycorp.entity");
this.thrown.expectMessage("com.mycorp");
this.thrown.expectMessage(allOf(
containsString("'value'"),
containsString("'basePackages'"),
containsString("com.mycorp.entity"),
containsString("com.mycorp")));
new AnnotationConfigApplicationContext(ValueAndBasePackages.class);
}
......
......@@ -26,6 +26,8 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.AnnotationConfigurationException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.Matchers.containsString;
/**
* Tests for {@link ServletComponentScanRegistrar}
......@@ -76,7 +78,11 @@ public class ServletComponentScanRegistrarTests {
@Test
public void packagesConfiguredWithBothValueAndBasePackages() {
this.thrown.expect(AnnotationConfigurationException.class);
this.thrown.expectMessage("attribute 'value' and its alias 'basePackages' are declared");
this.thrown.expectMessage(allOf(
containsString("'value'"),
containsString("'basePackages'"),
containsString("com.example.foo"),
containsString("com.example.bar")));
new AnnotationConfigApplicationContext(ValueAndBasePackages.class);
}
......
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