66import static org .assertj .core .api .Assertions .assertThat ;
77
88import java .util .stream .Stream ;
9-
109import org .junit .jupiter .api .Test ;
1110import org .junit .jupiter .params .ParameterizedTest ;
1211import org .junit .jupiter .params .provider .Arguments ;
@@ -28,44 +27,45 @@ void updateMetricsExporter_ExporterUnset() {
2827 assertThat (AiConfigCustomizer .updateMetricsExporter (null , null ))
2928 .isEqualTo ("azure_monitor,otlp" );
3029
31- assertThat (AiConfigCustomizer .updateMetricsExporter ("" , null ))
32- .isEqualTo ("azure_monitor,otlp" );
33-
30+ assertThat (AiConfigCustomizer .updateMetricsExporter ("" , null )).isEqualTo ("azure_monitor,otlp" );
31+
3432 assertThat (AiConfigCustomizer .updateMetricsExporter (null , "true" ))
3533 .isEqualTo ("azure_monitor,otlp" );
36-
34+
3735 assertThat (AiConfigCustomizer .updateMetricsExporter (null , "True" ))
3836 .isEqualTo ("azure_monitor,otlp" );
3937 }
4038
4139 static Stream <Arguments > stringPairs () {
4240 return Stream .of (
43- Arguments .of ("none" , "none" ),
44- Arguments .of ("azure_monitor" , "azure_monitor,otlp" ),
41+ Arguments .of ("none" , "none" ),
42+ Arguments .of ("azure_monitor" , "azure_monitor,otlp" ),
4543 Arguments .of ("azure_monitor,otlp" , "azure_monitor,otlp" ),
46- Arguments .of ("otlp" , "otlp" ));
47- }
48-
44+ Arguments .of ("otlp" , "otlp" ));
45+ }
46+
4947 @ ParameterizedTest
5048 @ MethodSource ("stringPairs" )
51- void updateMetricsExporter_ExporterSet_AMLE_Unset (String metricsExporter , String expectAzureMonitor ) {
49+ void updateMetricsExporter_ExporterSet_AMLE_Unset (
50+ String metricsExporter , String expectAzureMonitor ) {
5251 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , null ))
5352 .isEqualTo (expectAzureMonitor );
5453 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , "" ))
5554 .isEqualTo (expectAzureMonitor );
5655 }
57-
56+
5857 static Stream <Arguments > stringPairs2 () {
5958 return Stream .of (
60- Arguments .of ("none" , "azure_monitor,otlp" ),
61- Arguments .of ("azure_monitor" , "azure_monitor,otlp" ),
62- Arguments .of ("azure_monitor,otlp" , "azure_monitor,otlp" ),
63- Arguments .of ("otlp" , "otlp,azure_monitor" ));
64- }
65-
59+ Arguments .of ("none" , "azure_monitor,otlp" ),
60+ Arguments .of ("azure_monitor" , "azure_monitor,otlp" ),
61+ Arguments .of ("azure_monitor,otlp" , "azure_monitor,otlp" ),
62+ Arguments .of ("otlp" , "otlp,azure_monitor" ));
63+ }
64+
6665 @ ParameterizedTest
6766 @ MethodSource ("stringPairs2" )
68- void updateMetricsExporter_ExporterSet_AMLE_True (String metricsExporter , String expectAzureMonitor ) {
67+ void updateMetricsExporter_ExporterSet_AMLE_True (
68+ String metricsExporter , String expectAzureMonitor ) {
6969 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , "true" ))
7070 .isEqualTo (expectAzureMonitor );
7171 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , "True" ))
@@ -74,15 +74,16 @@ void updateMetricsExporter_ExporterSet_AMLE_True(String metricsExporter, String
7474
7575 static Stream <Arguments > stringPairs3 () {
7676 return Stream .of (
77- Arguments .of ("none" , "none" ),
78- Arguments .of ("azure_monitor" , "azure_monitor" ),
79- Arguments .of ("azure_monitor,otlp" , "azure_monitor" ),
80- Arguments .of ("otlp" , "otlp" ));
81- }
82-
77+ Arguments .of ("none" , "none" ),
78+ Arguments .of ("azure_monitor" , "azure_monitor" ),
79+ Arguments .of ("azure_monitor,otlp" , "azure_monitor" ),
80+ Arguments .of ("otlp" , "otlp" ));
81+ }
82+
8383 @ ParameterizedTest
8484 @ MethodSource ("stringPairs3" )
85- void updateMetricsExporter_ExporterSet_AMLE_False (String metricsExporter , String expectAzureMonitor ) {
85+ void updateMetricsExporter_ExporterSet_AMLE_False (
86+ String metricsExporter , String expectAzureMonitor ) {
8687 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , "false" ))
8788 .isEqualTo (expectAzureMonitor );
8889 assertThat (AiConfigCustomizer .updateMetricsExporter (metricsExporter , "False" ))
0 commit comments