Skip to content

Commit

Permalink
Improved execution of grouped assertions (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
eas5 committed Mar 31, 2021
1 parent 260fe11 commit 5dde24d
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package de.codecentric.boot.admin.client.registration;

import org.assertj.core.api.SoftAssertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
Expand All @@ -29,7 +30,6 @@

import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -63,9 +63,11 @@ public void should_use_application_uri() {

Application app = this.factory.createApplication();

assertThat(app.getManagementUrl()).isEqualTo("http://application/Uppercase/actuator");
assertThat(app.getHealthUrl()).isEqualTo("http://application/Uppercase/actuator/health");
assertThat(app.getServiceUrl()).isEqualTo("http://application/Uppercase/");
SoftAssertions softly = new SoftAssertions();
softly.assertThat(app.getManagementUrl()).isEqualTo("http://application/Uppercase/actuator");
softly.assertThat(app.getHealthUrl()).isEqualTo("http://application/Uppercase/actuator/health");
softly.assertThat(app.getServiceUrl()).isEqualTo("http://application/Uppercase/");
softly.assertAll();
}

@Test
Expand All @@ -76,9 +78,11 @@ public void should_use_service_base_uri() {

Application app = this.factory.createApplication();

assertThat(app.getManagementUrl()).isEqualTo("https://serviceBaseUrl/actuator");
assertThat(app.getHealthUrl()).isEqualTo("https://serviceBaseUrl/actuator/health");
assertThat(app.getServiceUrl()).isEqualTo("https://serviceBaseUrl/");
SoftAssertions softly = new SoftAssertions();
softly.assertThat(app.getManagementUrl()).isEqualTo("https://serviceBaseUrl/actuator");
softly.assertThat(app.getHealthUrl()).isEqualTo("https://serviceBaseUrl/actuator/health");
softly.assertThat(app.getServiceUrl()).isEqualTo("https://serviceBaseUrl/");
softly.assertAll();
}

}

0 comments on commit 5dde24d

Please sign in to comment.