File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
core/src/test/java/org/testcontainers/containers Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 4646import static org .assertj .core .api .Assertions .assertThatThrownBy ;
4747import static org .assertj .core .api .Assertions .catchThrowable ;
4848import 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
5350public 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
You can’t perform that action at this time.
0 commit comments