@@ -18,7 +18,8 @@ class ContextMapperGeneratorTest {
1818 "PLANT_UML, plantuml" ,
1919 "GENERIC, generic"
2020 })
21- void getName_WhenUsingGeneratorEnumValue_ThenCanGetGeneratorName (ContextMapperGenerator generator , String expectedName ) {
21+ void getName_WhenUsingGeneratorEnumValue_ThenCanGetGeneratorName (ContextMapperGenerator generator ,
22+ String expectedName ) {
2223 // Given
2324 // generator and expectedName are provided by @CsvSource
2425
@@ -30,7 +31,7 @@ void getName_WhenUsingGeneratorEnumValue_ThenCanGetGeneratorName(ContextMapperGe
3031 }
3132
3233 @ ParameterizedTest
33- @ ValueSource (strings = {"CONTEXT_MAP" , "PLANT_UML" , "GENERIC" })
34+ @ ValueSource (strings = { "CONTEXT_MAP" , "PLANT_UML" , "GENERIC" })
3435 void getDescription_WhenUsingGeneratorEnumValue_ThenCanGetGeneratorDescription (final String enumValueAsString ) {
3536 // Given
3637 final ContextMapperGenerator generator = ContextMapperGenerator .valueOf (enumValueAsString );
@@ -62,7 +63,7 @@ void toString_ReturnsName(ContextMapperGenerator generator, String expectedName)
6263 }
6364
6465 @ ParameterizedTest
65- @ ValueSource (strings = {"context-map" , "plantuml" , "generic" , "CONTEXT-MAP" , "PlantUML" , "GeNeRiC" })
66+ @ ValueSource (strings = { "context-map" , "plantuml" , "generic" , "CONTEXT-MAP" , "PlantUML" , "GeNeRiC" })
6667 void byName_WhenWithValidName_ThenReturnGenerator (final String validGeneratorKey ) {
6768 // Given
6869 // validGeneratorKey is provided by @ValueSource
@@ -80,8 +81,7 @@ void byName_WhenWithoutName_ThenThrowIllegalArgumentException() {
8081 // No specific setup needed
8182
8283 // When & Then
83- assertThatExceptionOfType (IllegalArgumentException .class ).isThrownBy (() ->
84- ContextMapperGenerator .byName (null ))
84+ assertThatExceptionOfType (IllegalArgumentException .class ).isThrownBy (() -> ContextMapperGenerator .byName (null ))
8585 .withMessageContaining ("Please provide a name for the generator." );
8686 }
8787
@@ -91,8 +91,7 @@ void byName_WhenWithEmptyName_ThenThrowIllegalArgumentException() {
9191 // No specific setup needed
9292
9393 // When & Then
94- assertThatExceptionOfType (IllegalArgumentException .class ).isThrownBy (() ->
95- ContextMapperGenerator .byName ("" ))
94+ assertThatExceptionOfType (IllegalArgumentException .class ).isThrownBy (() -> ContextMapperGenerator .byName ("" ))
9695 .withMessageContaining ("Please provide a name for the generator." );
9796 }
9897
@@ -102,13 +101,14 @@ void byName_WhenWithInvalidName_ThenThrowIllegalArgumentException() {
102101 // No specific setup needed
103102
104103 // When & Then
105- assertThatExceptionOfType (IllegalArgumentException .class ).isThrownBy (() ->
106- ContextMapperGenerator .byName ("just a string" ))
107- .withMessageContaining ("No generator found for the name 'just a string'. Valid values are: context-map, plantuml, generic" );
104+ assertThatExceptionOfType (IllegalArgumentException .class )
105+ .isThrownBy (() -> ContextMapperGenerator .byName ("just a string" ))
106+ .withMessageContaining (
107+ "No generator found for the name 'just a string'. Valid values are: context-map, plantuml, generic" );
108108 }
109109
110110 @ ParameterizedTest
111- @ ValueSource (strings = {"CONTEXT_MAP" , "PLANT_UML" , "GENERIC" })
111+ @ ValueSource (strings = { "CONTEXT_MAP" , "PLANT_UML" , "GENERIC" })
112112 void getGenerator_WhenCalled_ThenReturnGeneratorImplementation (final String enumValueAsString ) {
113113 // Given
114114 final ContextMapperGenerator generator = ContextMapperGenerator .valueOf (enumValueAsString );
@@ -133,7 +133,7 @@ void getDisplayName_ReturnsCorrectFormat(ContextMapperGenerator generator, Strin
133133
134134 // When
135135 String displayName = generator .getDisplayName ();
136-
136+
137137 // Then
138138 assertThat (displayName ).isEqualTo (expectedDisplayName );
139139 }
0 commit comments