Skip to content

Commit

Permalink
Add test for equals contract of ContainerStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Apr 16, 2024
1 parent 8eea051 commit 8b9ff94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@
<version>1.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.16.1</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- org.testcontainers:testcontainers uses org.slf4j:slf4j-api for logging.
To get the complete log during tests we redirect slf4j to JUL with this dependency. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

import nl.jqno.equalsverifier.EqualsVerifier;

@Tag("fast")
class ContainerStatusTest {

@Test
void testEqualsContract() {
EqualsVerifier.forClass(ContainerStatus.class).verify();
}

@Test
void testGetContainerId() throws Exception {
final String containerId = "the_id";
Expand Down Expand Up @@ -49,4 +57,4 @@ void testAddAllAppliedWorkarounds() {
status.addAllAppliedWorkarounds(Set.of("A", "B"));
assertThat(status.getAppliedWorkarounds(), containsInAnyOrder("A", "B"));
}
}
}

0 comments on commit 8b9ff94

Please sign in to comment.