Skip to content

Commit

Permalink
Log start and end of MongoDriverHanoiTest
Browse files Browse the repository at this point in the history
  • Loading branch information
prdoyle committed Jul 6, 2024
1 parent 3924ccc commit 130eb9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void runTearDown(TestInfo testInfo) {
logTest("\\=== Done", testInfo);
}

private static void logTest(String verb, TestInfo testInfo) {
public static void logTest(String verb, TestInfo testInfo) {
String method =
testInfo.getTestClass().map(Class::getSimpleName).orElse(null)
+ "."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package works.bosk.drivers.mongo;

import java.util.stream.Stream;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInfo;
import works.bosk.drivers.HanoiTest;
import works.bosk.junit.ParametersByName;

Expand All @@ -27,6 +30,16 @@ static void setupMongoConnection() {
mongoService = new MongoService();
}

@BeforeEach
void logStart(TestInfo testInfo) {
AbstractMongoDriverTest.logTest("/=== Start", testInfo);
}

@AfterEach
void logDone(TestInfo testInfo) {
AbstractMongoDriverTest.logTest("/=== Done", testInfo);
}

@SuppressWarnings("unused")
static Stream<TestParameters.ParameterSet> parameters() {
return TestParameters.driverSettings(
Expand Down

0 comments on commit 130eb9f

Please sign in to comment.