Skip to content

Commit b7afcde

Browse files
committed
Fix checkstyle (in tests)
1 parent bf95365 commit b7afcde

File tree

2 files changed

+252
-272
lines changed

2 files changed

+252
-272
lines changed

spring-data-eclipse-store-migration/src/test/java/software/xdev/spring/data/eclipse/store/AddAnnotationToOtherAnnotationTest.java

Lines changed: 149 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -46,186 +46,174 @@ public void defaults(final RecipeSpec recipeSpec)
4646
@Test
4747
void testSimpleSingle()
4848
{
49-
this.rewriteRun
50-
(
51-
java
52-
(
53-
"""
54-
import org.springframework.boot.autoconfigure.SpringBootApplication;
55-
56-
@SpringBootApplication
57-
class A
58-
{
59-
public A()
60-
{
61-
}
62-
}
63-
""",
64-
"""
65-
import org.springframework.boot.autoconfigure.SpringBootApplication;
66-
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
67-
68-
@EnableEclipseStoreRepositories
69-
@SpringBootApplication
70-
class A
71-
{
72-
public A()
73-
{
74-
}
75-
}
76-
"""
77-
)
78-
);
49+
this.rewriteRun(
50+
java(
51+
"""
52+
import org.springframework.boot.autoconfigure.SpringBootApplication;
53+
54+
@SpringBootApplication
55+
class A
56+
{
57+
public A()
58+
{
59+
}
60+
}
61+
""",
62+
"""
63+
import org.springframework.boot.autoconfigure.SpringBootApplication;
64+
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
65+
66+
@EnableEclipseStoreRepositories
67+
@SpringBootApplication
68+
class A
69+
{
70+
public A()
71+
{
72+
}
73+
}
74+
"""
75+
)
76+
);
7977
}
8078

8179
@Test
8280
void testSimpleMultiple()
8381
{
84-
this.rewriteRun
85-
(
86-
java
87-
(
88-
"""
89-
import org.springframework.boot.autoconfigure.SpringBootApplication;
90-
91-
@SpringBootApplication
92-
class A
93-
{
94-
public A()
95-
{
96-
}
97-
}
98-
""",
99-
"""
100-
import org.springframework.boot.autoconfigure.SpringBootApplication;
101-
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
102-
103-
@EnableEclipseStoreRepositories
104-
@SpringBootApplication
105-
class A
106-
{
107-
public A()
108-
{
109-
}
110-
}
111-
"""
112-
),
113-
java
114-
(
115-
"""
116-
import org.springframework.boot.autoconfigure.SpringBootApplication;
117-
118-
@SpringBootApplication
119-
class B
120-
{
121-
public B()
122-
{
123-
}
124-
}
125-
""",
126-
"""
127-
import org.springframework.boot.autoconfigure.SpringBootApplication;
128-
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
129-
130-
@EnableEclipseStoreRepositories
131-
@SpringBootApplication
132-
class B
133-
{
134-
public B()
135-
{
136-
}
137-
}
138-
"""
139-
)
140-
);
82+
this.rewriteRun(
83+
java(
84+
"""
85+
import org.springframework.boot.autoconfigure.SpringBootApplication;
86+
87+
@SpringBootApplication
88+
class A
89+
{
90+
public A()
91+
{
92+
}
93+
}
94+
""",
95+
"""
96+
import org.springframework.boot.autoconfigure.SpringBootApplication;
97+
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
98+
99+
@EnableEclipseStoreRepositories
100+
@SpringBootApplication
101+
class A
102+
{
103+
public A()
104+
{
105+
}
106+
}
107+
"""
108+
),
109+
java(
110+
"""
111+
import org.springframework.boot.autoconfigure.SpringBootApplication;
112+
113+
@SpringBootApplication
114+
class B
115+
{
116+
public B()
117+
{
118+
}
119+
}
120+
""",
121+
"""
122+
import org.springframework.boot.autoconfigure.SpringBootApplication;
123+
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
124+
125+
@EnableEclipseStoreRepositories
126+
@SpringBootApplication
127+
class B
128+
{
129+
public B()
130+
{
131+
}
132+
}
133+
"""
134+
)
135+
);
141136
}
142137

143138
@Test
144139
void testAlreadyAdded()
145140
{
146-
this.rewriteRun
147-
(
148-
java
149-
(
150-
"""
151-
import org.springframework.boot.autoconfigure.SpringBootApplication;
152-
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
153-
154-
@EnableEclipseStoreRepositories
155-
@SpringBootApplication
156-
class A
157-
{
158-
public A()
159-
{
160-
}
161-
}
162-
"""
163-
)
164-
);
141+
this.rewriteRun(
142+
java(
143+
"""
144+
import org.springframework.boot.autoconfigure.SpringBootApplication;
145+
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
146+
147+
@EnableEclipseStoreRepositories
148+
@SpringBootApplication
149+
class A
150+
{
151+
public A()
152+
{
153+
}
154+
}
155+
"""
156+
)
157+
);
165158
}
166159

167160
@Test
168161
void testSimpleNoAnnotation()
169162
{
170-
this.rewriteRun
171-
(
172-
java
173-
(
174-
"""
175-
class A
176-
{
177-
public A()
178-
{
179-
}
180-
}
181-
"""
182-
)
183-
);
163+
this.rewriteRun(
164+
java(
165+
"""
166+
class A
167+
{
168+
public A()
169+
{
170+
}
171+
}
172+
"""
173+
)
174+
);
184175
}
185176

186177
@Test
187178
void testSimpleNoAnnotationAndAnnotation()
188179
{
189-
this.rewriteRun
190-
(
191-
java
192-
(
193-
"""
194-
class B
195-
{
196-
public B()
197-
{
198-
}
199-
}
200-
"""
201-
),
202-
java
203-
(
204-
"""
205-
import org.springframework.boot.autoconfigure.SpringBootApplication;
206-
207-
@SpringBootApplication
208-
class A
209-
{
210-
public A()
211-
{
212-
}
213-
}
214-
""",
215-
"""
216-
import org.springframework.boot.autoconfigure.SpringBootApplication;
217-
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
218-
219-
@EnableEclipseStoreRepositories
220-
@SpringBootApplication
221-
class A
222-
{
223-
public A()
224-
{
225-
}
226-
}
227-
"""
228-
)
229-
);
180+
this.rewriteRun(
181+
java(
182+
"""
183+
class B
184+
{
185+
public B()
186+
{
187+
}
188+
}
189+
"""
190+
),
191+
java(
192+
"""
193+
import org.springframework.boot.autoconfigure.SpringBootApplication;
194+
195+
@SpringBootApplication
196+
class A
197+
{
198+
public A()
199+
{
200+
}
201+
}
202+
""",
203+
"""
204+
import org.springframework.boot.autoconfigure.SpringBootApplication;
205+
import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories;
206+
207+
@EnableEclipseStoreRepositories
208+
@SpringBootApplication
209+
class A
210+
{
211+
public A()
212+
{
213+
}
214+
}
215+
"""
216+
)
217+
);
230218
}
231219
}

0 commit comments

Comments
 (0)