Skip to content

Commit 5deaa7a

Browse files
committed
fix: use only assertj assertions
1 parent d97d51b commit 5deaa7a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

core/src/test/java/org/testcontainers/containers/GenericContainerTest.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@
4646
import static org.assertj.core.api.Assertions.assertThatThrownBy;
4747
import static org.assertj.core.api.Assertions.catchThrowable;
4848
import static org.assertj.core.api.Assumptions.assumeThat;
49-
import static org.rnorth.visibleassertions.VisibleAssertions.assertEquals;
50-
import static org.rnorth.visibleassertions.VisibleAssertions.assertNotNull;
51-
import static org.rnorth.visibleassertions.VisibleAssertions.assertTrue;
5249

5350
public class GenericContainerTest {
5451

@@ -269,12 +266,11 @@ public void shouldHonorUDPPorts() {
269266
.getPorts()
270267
.getBindings();
271268

272-
assertEquals("Two TCP ports should have been exposed.", 2, container.getExposedPorts().size());
273-
assertNotNull("withExposedPorts should have exposed UDP port", map.get(expectedPort));
274-
assertTrue(
275-
"UDP port 99 should have been mapped to a different port",
276-
99 != Integer.valueOf(map.get(expectedPort)[0].getHostPortSpec())
277-
);
269+
assertThat(container.getExposedPorts()).as("Two TCP ports should have been exposed").hasSize(2);
270+
assertThat(map.get(expectedPort)).as("withExposedPorts should have exposed UDP port").isNotEmpty();
271+
assertThat(Integer.valueOf(map.get(expectedPort)[0].getHostPortSpec()))
272+
.as("UDP port 99 should have been mapped to a different port")
273+
.isNotEqualTo(99);
278274
}
279275
}
280276

0 commit comments

Comments
 (0)