@@ -31,10 +31,10 @@ public class LogEventForwarderTest {
31
31
@ ParameterizedTest
32
32
@ CsvSource ({
33
33
", 1, 2, true, . " ,
34
- "company, , 0, false, \\ d " ,
35
- "company, 0, , true, [\\ w-.#]+@[\\ w-.]+ " ,
36
- "company, 333, 4444, false, \\ d+\\ .\\ d+\\ .\\ d+\\ .\\ d+ " ,
37
- "company, 55555, 666666, false, " ,
34
+ "company, , 0, false, \\ d " ,
35
+ "company, 0, , true, [\\ w-.#]+@[\\ w-.]+ " ,
36
+ "company, 333, 4444, false, \\ d+\\ .\\ d+\\ .\\ d+\\ .\\ d+ " ,
37
+ "company, 55555, 666666, false, " ,
38
38
})
39
39
public void testConfigurationParameters (String companyName , Integer connectTimeout ,
40
40
Integer readTimeout , Boolean debugging , String regexScrub ) throws Exception {
@@ -50,6 +50,7 @@ public void testConfigurationParameters(String companyName, Integer connectTimeo
50
50
debugging != null ? debugging .toString () : null )
51
51
.and (LogEventForwarder .PARAMETER_REGEX_SCRUB , regexScrub )
52
52
.execute (() -> {
53
+
53
54
LMLogsApi api = LogEventForwarder .configureApi ();
54
55
LogEventAdapter adapter = LogEventForwarder .configureAdapter ();
55
56
assertAll (
@@ -62,7 +63,10 @@ public void testConfigurationParameters(String companyName, Integer connectTimeo
62
63
() -> assertEquals (debugging != null ? debugging : false ,
63
64
api .getApiClient ().isDebugging ()),
64
65
() -> assertEquals (regexScrub ,
65
- regexScrub != null ? adapter .getScrubPattern ().pattern () : adapter .getScrubPattern ())
66
+ regexScrub != null ? adapter .getScrubPattern ().pattern () : adapter .getScrubPattern ()),
67
+ () -> assertEquals (LogEventForwarder .getUserAgent (),
68
+ api .getApiClient ().getUserAgent ())
69
+
66
70
);
67
71
}
68
72
);
0 commit comments