22
33import lombok .extern .slf4j .Slf4j ;
44import org .junit .Ignore ;
5- import org .junit .jupiter .api .MethodOrderer ;
6- import org .junit .jupiter .api .Test ;
7- import org .junit .jupiter .api .TestInstance ;
8- import org .junit .jupiter .api .TestMethodOrder ;
5+ import org .junit .jupiter .api .*;
96import org .springframework .beans .factory .annotation .Autowired ;
107
118
@@ -73,8 +70,8 @@ public class UserAccountServiceIT {
7370 @ Autowired
7471 protected UserAccountService userAccountService ;
7572
76- @ Autowired
77- protected ApplicationUserDetailsService applicationUserDetailsServiceImpl ;
73+ @ Autowired
74+ protected ApplicationUserDetailsService applicationUserDetailsServiceImpl ;
7875
7976 @ Autowired
8077 protected UserAuthorizationService userAuthorizationService ;
@@ -106,6 +103,7 @@ public class UserAccountServiceIT {
106103 }
107104
108105 @ Ignore
106+ @ Order (1 )
109107 @ Test
110108 public void testStartSecondOptIn () throws Exception {
111109 int zeroNumberOfAllRegistrations = 1 ;
@@ -134,6 +132,7 @@ public void testStartSecondOptIn() throws Exception {
134132 }
135133
136134 @ Ignore
135+ @ Order (2 )
137136 @ Test
138137 public void testPasswordResetSendEmail () throws Exception {
139138 deleteAll ();
@@ -164,6 +163,7 @@ public void testPasswordResetSendEmail() throws Exception {
164163 }
165164
166165 @ Ignore
166+ @ Order (3 )
167167 @ Test
168168 public void testSaveAndFlush (){
169169 deleteAll ();
@@ -185,6 +185,7 @@ public void testSaveAndFlush(){
185185 }
186186
187187 @ Ignore
188+ @ Order (4 )
188189 @ Test
189190 public void testLoadUserByUsername (){
190191 for (String email :emails ){
@@ -199,6 +200,7 @@ public void testLoadUserByUsername(){
199200 }
200201
201202 @ Ignore
203+ @ Order (5 )
202204 @ Test
203205 public void testAuthorize (){
204206 LoginForm loginForm = new LoginForm ();
@@ -212,6 +214,7 @@ public void testAuthorize(){
212214 }
213215
214216 @ Ignore
217+ @ Order (6 )
215218 @ Test
216219 public void testIsEmailAvailable () {
217220 assertTrue (userAccountService .isEmailAvailable (emails [0 ]));
@@ -220,6 +223,7 @@ public void testIsEmailAvailable() {
220223
221224
222225 @ Ignore
226+ @ Order (7 )
223227 @ Test
224228 public void testCreateUser () {
225229 UserAccountForm userAccount = new UserAccountForm ();
@@ -230,7 +234,9 @@ public void testCreateUser() {
230234 userAccountService .createUser (userAccount );
231235 assertTrue (userAccountService .isEmailAvailable (username_email ));
232236 }
237+
233238 @ Ignore
239+ @ Order (8 )
234240 @ Test
235241 public void testChangeUsersPassword (){
236242 UserAccountForm userAccount = new UserAccountForm ();
@@ -240,13 +246,17 @@ public void testChangeUsersPassword(){
240246 userAccount .setUserFullname (fullnames [0 ]);
241247 userAccountService .changeUsersPassword (userAccount );
242248 }
249+
243250 @ Ignore
251+ @ Order (9 )
244252 @ Test
245253 public void testRetrieveUsernameLoggedOut (){
246254 String userName = loginSuccessService .retrieveUsername ();
247255 assertTrue (userName .compareTo (" " )==0 );
248256 }
257+
249258 @ Ignore
259+ @ Order (10 )
250260 @ Test
251261 public void testRetrieveUsernameLoggedIn (){
252262 makeActiveUser (emails [0 ]);
@@ -255,13 +265,17 @@ public void testRetrieveUsernameLoggedIn(){
255265 assertTrue (emails [0 ].compareTo (userName ) == 0 );
256266 SecurityContextHolder .clearContext ();
257267 }
268+
258269 @ Ignore
270+ @ Order (11 )
259271 @ Test
260272 //@Test(expected = UsernameNotFoundException.class)
261273 public void testRetrieveCurrentUserLoggedOut (){
262274 loginSuccessService .retrieveCurrentUser ();
263275 }
276+
264277 @ Ignore
278+ @ Order (12 )
265279 @ Test
266280 public void testRetrieveCurrentUserLoggedIn (){
267281 makeActiveUser (emails [0 ]);
0 commit comments