@@ -36,61 +36,61 @@ class EpfStorageTest
3636 @ BeforeEach
3737 void before ()
3838 {
39- storage = new Storage ();
39+ this . storage = new Storage ();
4040
41- storage .setActions (new HashSet <>( ));
42- storage .setInclusions (new HashSet <>());
43- storage .setExclusions (new HashSet <>());
41+ this . storage .setActions (EnumSet . noneOf ( Action . class ));
42+ this . storage .setInclusions (new HashSet <>());
43+ this . storage .setExclusions (new HashSet <>());
4444
45- storage .getActions ().add (activate );
46- storage .getActions ().add (reformat );
47- storage .getActions ().add (reformatChangedCode );
48- storage .getActions ().add (fieldCanBeFinal );
49- storage .getActions ().add (missingOverrideAnnotation );
50- storage .getActions ().add (unnecessarySemicolon );
45+ this . storage .getActions ().add (activate );
46+ this . storage .getActions ().add (reformat );
47+ this . storage .getActions ().add (reformatChangedCode );
48+ this . storage .getActions ().add (fieldCanBeFinal );
49+ this . storage .getActions ().add (missingOverrideAnnotation );
50+ this . storage .getActions ().add (unnecessarySemicolon );
5151
52- storage .getInclusions ().add ("inclusion1" );
53- storage .getInclusions ().add ("inclusion2" );
52+ this . storage .getInclusions ().add ("inclusion1" );
53+ this . storage .getInclusions ().add ("inclusion2" );
5454
55- storage .getExclusions ().add ("exclusion1" );
56- storage .getExclusions ().add ("exclusion2" );
55+ this . storage .getExclusions ().add ("exclusion1" );
56+ this . storage .getExclusions ().add ("exclusion2" );
5757 }
5858
5959 @ Test
6060 void should_storage_with_bad_configuration_path_returns_default_storage ()
6161 {
6262 Storage epfStorage ;
6363
64- epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (storage .getConfigurationPath (), storage );
65- assertThat (storage ).isSameAs (epfStorage );
64+ epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (this . storage .getConfigurationPath (), this . storage );
65+ assertThat (this . storage ).isSameAs (epfStorage );
6666
67- storage .setConfigurationPath ("bad path" );
68- epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (storage .getConfigurationPath (), storage );
69- assertThat (storage ).isSameAs (epfStorage );
67+ this . storage .setConfigurationPath ("bad path" );
68+ epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (this . storage .getConfigurationPath (), this . storage );
69+ assertThat (this . storage ).isSameAs (epfStorage );
7070 }
7171
7272 @ Test
7373 void should_default_storage_values_are_copied_to_epf_storage_if_empty_file ()
7474 {
75- Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_0 .toString (), storage );
76- assertThat (epfStorage ).isNotSameAs (storage );
75+ final Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_0 .toString (), this . storage );
76+ assertThat (epfStorage ).isNotSameAs (this . storage );
7777
78- assertThat (epfStorage .getActions ()).isNotSameAs (storage .getActions ());
79- assertThat (epfStorage .getInclusions ()).isNotSameAs (storage .getInclusions ());
80- assertThat (epfStorage .getExclusions ()).isNotSameAs (storage .getExclusions ());
78+ assertThat (epfStorage .getActions ()).isNotSameAs (this . storage .getActions ());
79+ assertThat (epfStorage .getInclusions ()).isNotSameAs (this . storage .getInclusions ());
80+ assertThat (epfStorage .getExclusions ()).isNotSameAs (this . storage .getExclusions ());
8181
82- assertThat (epfStorage .getActions ()).isEqualTo (storage .getActions ());
83- assertThat (epfStorage .getInclusions ()).isEqualTo (storage .getInclusions ());
84- assertThat (epfStorage .getExclusions ()).isEqualTo (storage .getExclusions ());
82+ assertThat (epfStorage .getActions ()).isEqualTo (this . storage .getActions ());
83+ assertThat (epfStorage .getInclusions ()).isEqualTo (this . storage .getInclusions ());
84+ assertThat (epfStorage .getExclusions ()).isEqualTo (this . storage .getExclusions ());
8585 }
8686
8787 @ Test
8888 void should_storage_values_are_correct_for_file_format_1 ()
8989 {
90- Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_1 .toString (), storage );
91- assertThat (epfStorage ).isNotSameAs (storage );
90+ final Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_1 .toString (), this . storage );
91+ assertThat (epfStorage ).isNotSameAs (this . storage );
9292
93- EnumSet <Action > expected = EnumSet .of (
93+ final EnumSet <Action > expected = EnumSet .of (
9494 // from default store (not in java)
9595 activate ,
9696 // in both store
@@ -116,17 +116,17 @@ void should_storage_values_are_correct_for_file_format_1()
116116 );
117117
118118 assertThat (epfStorage .getActions ()).isEqualTo (expected );
119- assertThat (epfStorage .getInclusions ()).isEqualTo (storage .getInclusions ());
120- assertThat (epfStorage .getExclusions ()).isEqualTo (storage .getExclusions ());
119+ assertThat (epfStorage .getInclusions ()).isEqualTo (this . storage .getInclusions ());
120+ assertThat (epfStorage .getExclusions ()).isEqualTo (this . storage .getExclusions ());
121121 }
122122
123123 @ Test
124124 void should_storage_values_are_correct_for_file_format_2 ()
125125 {
126- Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_2 .toString (), storage );
127- assertThat (epfStorage ).isNotSameAs (storage );
126+ final Storage epfStorage = EpfStorage .INSTANCE .getStorageOrDefault (EXAMPLE_EPF_2 .toString (), this . storage );
127+ assertThat (epfStorage ).isNotSameAs (this . storage );
128128
129- EnumSet <Action > expected = EnumSet .of (
129+ final EnumSet <Action > expected = EnumSet .of (
130130 missingOverrideAnnotation ,
131131 unnecessarySemicolon ,
132132 rearrange ,
@@ -141,7 +141,7 @@ void should_storage_values_are_correct_for_file_format_2()
141141 );
142142
143143 assertThat (epfStorage .getActions ()).isEqualTo (expected );
144- assertThat (epfStorage .getInclusions ()).isEqualTo (storage .getInclusions ());
145- assertThat (epfStorage .getExclusions ()).isEqualTo (storage .getExclusions ());
144+ assertThat (epfStorage .getInclusions ()).isEqualTo (this . storage .getInclusions ());
145+ assertThat (epfStorage .getExclusions ()).isEqualTo (this . storage .getExclusions ());
146146 }
147147}
0 commit comments