Class MongoVerifyTest
java.lang.Object
info.ejava.examples.svc.tcontainers.hello.MongoVerifyTest
This is a self-test of the actual_hostport_matches_expected() method.
It provides the method for other tests to use and locally verifies its
validity.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactual_hostport_matches_expected(String expectedMongoUrl, String description) (package private) voiddescription_hostport_matches(String shortDescription, String hostPort) (package private) voidurl_hostport_matches(String url, String hostPort)
-
Field Details
-
DESCR_ADDRESS_PATTERN
-
URL_HOSTPORT_PATTERN
-
-
Constructor Details
-
MongoVerifyTest
public MongoVerifyTest()
-
-
Method Details
-
description_hostport_matches
@ParameterizedTest @CsvSource(delimiterString="@", value={"{type=STANDALONE, servers=[{address=localhost:56295, type=STANDALONE, roundTripTime=20.3 ms, state=CONNECTED}]}@localhost:56295","{type=STANDALONE, servers=[{address=host.docker.internal:56295, type=STANDALONE, roundTripTime=20.3 ms, state=CONNECTED}]}@host.docker.internal:56295"}) void description_hostport_matches(String shortDescription, String hostPort) -
url_hostport_matches
@ParameterizedTest @CsvSource({"spring.data.mongodb.uri=mongodb://admin:secret@localhost:56295/test?authSource=admin,localhost:56295","spring.data.mongodb.uri=mongodb://admin:secret@host.docker.internal:56295/test?authSource=admin,host.docker.internal:56295"}) void url_hostport_matches(String url, String hostPort) -
actual_hostport_matches_expected
@ParameterizedTest @CsvSource(delimiterString="#", value={"spring.data.mongodb.uri=mongodb://admin:secret@localhost:56295/test?authSource=admin,localhost:56295#{type=STANDALONE, servers=[{address=localhost:56295, type=STANDALONE, roundTripTime=20.3 ms, state=CONNECTED}]}@localhost:56295#","spring.data.mongodb.uri=mongodb://admin:secret@host.docker.internal:56295/test?authSource=admin,host.docker.internal:56295#{type=STANDALONE, servers=[{address=host.docker.internal:56295, type=STANDALONE, roundTripTime=20.3 ms, state=CONNECTED}]}@host.docker.internal:56295"}) public void actual_hostport_matches_expected(String expectedMongoUrl, String description)
-