Merge pull request #7907 from eddumelendez:fix_assertions

* pr/7907:
  Fix incomplete assertions
This commit is contained in:
Stephane Nicoll 2017-01-08 09:13:24 +01:00
commit 7c161b9920
2 changed files with 3 additions and 3 deletions

View File

@ -85,8 +85,8 @@ public class MongoHealthIndicatorTests {
MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate);
Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(Status.DOWN);
assertThat(((String) health.getDetails().get("error"))
.contains("Connection failed"));
assertThat((String) health.getDetails().get("error"))
.contains("Connection failed");
verify(mongoTemplate).executeCommand("{ buildInfo: 1 }");
}

View File

@ -816,7 +816,7 @@ public class SpringApplicationTests {
this.context = application.run();
assertThat(this.context.getEnvironment())
.isNotInstanceOf(StandardServletEnvironment.class);
assertThat(this.context.getEnvironment().getProperty("foo"));
assertThat(this.context.getEnvironment().getProperty("foo")).isEqualTo("bar");
assertThat(this.context.getEnvironment().getPropertySources().iterator().next()
.getName()).isEqualTo(
TestPropertySourceUtils.INLINED_PROPERTIES_PROPERTY_SOURCE_NAME);