@@ -5,6 +5,7 @@ import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.EXTENDED
55import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.NONE
66import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE
77import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationConfigAware.Factory.withIndentationConfig
8+ import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE
89
910import org.assertj.core.api.Assertions.assertThat
1011import org.junit.jupiter.api.MethodOrderer.DisplayName
@@ -14,10 +15,10 @@ import org.junit.jupiter.params.provider.ValueSource
1415
1516@TestMethodOrder(DisplayName ::class )
1617class IndentationConfigAwareTest {
17- @ParameterizedTest(name = " indentationSize = {0}" )
18+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
1819 @ValueSource(ints = [2 , 4 , 8 ])
1920 fun `Int + IndentationAmount` (indentationSize : Int ) {
20- val config = IndentationConfig (" indentationSize " to indentationSize)
21+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
2122
2223 withIndentationConfig(config) {
2324 assertThat(42 + NONE ).isEqualTo(42 )
@@ -26,10 +27,10 @@ class IndentationConfigAwareTest {
2627 }
2728 }
2829
29- @ParameterizedTest(name = " indentationSize = {0}" )
30+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
3031 @ValueSource(ints = [2 , 4 , 8 ])
3132 fun `Int - IndentationAmount` (indentationSize : Int ) {
32- val config = IndentationConfig (" indentationSize " to indentationSize)
33+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
3334
3435 withIndentationConfig(config) {
3536 assertThat(42 - NONE ).isEqualTo(42 )
@@ -38,10 +39,10 @@ class IndentationConfigAwareTest {
3839 }
3940 }
4041
41- @ParameterizedTest(name = " indentationSize = {0}" )
42+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
4243 @ValueSource(ints = [2 , 4 , 8 ])
4344 fun `IndentationAmount + Int` (indentationSize : Int ) {
44- val config = IndentationConfig (" indentationSize " to indentationSize)
45+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
4546
4647 withIndentationConfig(config) {
4748 assertThat(NONE + 42 ).isEqualTo(42 + NONE )
@@ -52,10 +53,10 @@ class IndentationConfigAwareTest {
5253 }
5354 }
5455
55- @ParameterizedTest(name = " indentationSize = {0}" )
56+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
5657 @ValueSource(ints = [2 , 4 , 8 ])
5758 fun `IndentationAmount - Int` (indentationSize : Int ) {
58- val config = IndentationConfig (" indentationSize " to indentationSize)
59+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
5960
6061 withIndentationConfig(config) {
6162 assertThat(NONE - 42 ).isEqualTo(- (42 - NONE ))
@@ -66,10 +67,10 @@ class IndentationConfigAwareTest {
6667 }
6768 }
6869
69- @ParameterizedTest(name = " indentationSize = {0}" )
70+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
7071 @ValueSource(ints = [2 , 4 , 8 ])
7172 fun `IndentationAmount + IndentationAmount` (indentationSize : Int ) {
72- val config = IndentationConfig (" indentationSize " to indentationSize)
73+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
7374
7475 withIndentationConfig(config) {
7576 assertThat(NONE + SINGLE ).isEqualTo(0 + SINGLE )
@@ -80,10 +81,10 @@ class IndentationConfigAwareTest {
8081 }
8182 }
8283
83- @ParameterizedTest(name = " indentationSize = {0}" )
84+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
8485 @ValueSource(ints = [2 , 4 , 8 ])
8586 fun `IndentationAmount - IndentationAmount` (indentationSize : Int ) {
86- val config = IndentationConfig (" indentationSize " to indentationSize)
87+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
8788
8889 withIndentationConfig(config) {
8990 assertThat(NONE - SINGLE ).isEqualTo(0 - SINGLE )
@@ -95,10 +96,10 @@ class IndentationConfigAwareTest {
9596 }
9697 }
9798
98- @ParameterizedTest(name = " indentationSize = {0}" )
99+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
99100 @ValueSource(ints = [2 , 4 , 8 ])
100101 fun unaryPlus (indentationSize : Int ) {
101- val config = IndentationConfig (" indentationSize " to indentationSize)
102+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
102103
103104 withIndentationConfig(config) {
104105 assertThat(+ NONE ).isEqualTo(0 )
@@ -109,10 +110,10 @@ class IndentationConfigAwareTest {
109110 }
110111 }
111112
112- @ParameterizedTest(name = " indentationSize = {0}" )
113+ @ParameterizedTest(name = " $INDENTATION_SIZE = {0}" )
113114 @ValueSource(ints = [2 , 4 , 8 ])
114115 fun unaryMinus (indentationSize : Int ) {
115- val config = IndentationConfig (" indentationSize " to indentationSize)
116+ val config = IndentationConfig (INDENTATION_SIZE to indentationSize)
116117
117118 withIndentationConfig(config) {
118119 assertThat(- NONE ).isEqualTo(0 )
0 commit comments