Commit 8d7d044b authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #10084 from pvorb:fix-incomplete-assertions

* pr/10084:
  Identify and fix incomplete assertions
parents 83eee7e6 04ca7f13
......@@ -100,8 +100,8 @@ public class RedisHealthIndicatorTests {
redisConnectionFactory);
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(redisConnectionFactory).getConnection();
verify(redisConnection).info();
}
......
......@@ -94,8 +94,8 @@ public class SolrHealthIndicatorTests {
SolrHealthIndicator healthIndicator = new SolrHealthIndicator(solrClient);
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");
}
private NamedList<Object> mockResponse(int status) {
......
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
......@@ -166,8 +166,6 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
assertThat(analysis.getDescription()).startsWith(String.format(
"Constructor in %s required a bean named '%s' that could not be found",
StringNameHandler.class.getName(), "test-string"));
assertThat(analysis.getDescription().contains(
"No matching auto-configuration has been found for this bean name."));
assertThat(analysis.getAction()).startsWith(String.format(
"Consider defining a bean named '%s' in your configuration.",
"test-string"));
......
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
......@@ -75,8 +75,8 @@ public class DatabaseDriverClassNameTests {
@Test
public void databaseClassIsOfRequiredType() throws Exception {
assertThat(getInterfaceNames(this.className.replace('.', '/'))
.contains(this.requiredType.getName().replace('.', '/')));
assertThat(getInterfaceNames(this.className.replace('.', '/')))
.contains(this.requiredType.getName().replace('.', '/'));
}
private List<String> getInterfaceNames(String className) throws IOException {
......
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