16
16
17
17
package org .springframework .security .crypto .password ;
18
18
19
- import com .sun .org .apache .xpath .internal .SourceTree ;
20
19
import org .junit .Before ;
21
20
import org .junit .Test ;
22
21
import org .junit .runner .RunWith ;
23
22
import org .mockito .Mock ;
24
23
import org .mockito .junit .MockitoJUnitRunner ;
25
- import org .springframework .security .crypto .bcrypt .BCryptPasswordEncoder ;
26
- import org .springframework .security .crypto .scrypt .SCryptPasswordEncoder ;
27
24
28
25
import java .util .HashMap ;
29
26
import java .util .Map ;
@@ -50,8 +47,6 @@ public class DelegatingPasswordEncoderTests {
50
47
51
48
private String bcryptId = "bcrypt" ;
52
49
53
- private String noopId = "noop" ;
54
-
55
50
private String rawPassword = "password" ;
56
51
57
52
private String encodedPassword = "ENCODED-PASSWORD" ;
@@ -68,15 +63,14 @@ public class DelegatingPasswordEncoderTests {
68
63
public void setup () {
69
64
this .delegates = new HashMap <>();
70
65
this .delegates .put (this .bcryptId , this .bcrypt );
71
- this .delegates .put (this . noopId , this .noop );
66
+ this .delegates .put ("noop" , this .noop );
72
67
73
68
this .passwordEncoder = new DelegatingPasswordEncoder (this .bcryptId , this .delegates );
74
69
}
75
70
76
71
@ Test (expected = IllegalArgumentException .class )
77
72
public void constructorWhenIdForEncodeNullThenIllegalArgumentException () {
78
- String id = null ;
79
- new DelegatingPasswordEncoder (id , this .delegates );
73
+ new DelegatingPasswordEncoder (null , this .delegates );
80
74
}
81
75
82
76
@ Test (expected = IllegalArgumentException .class )
0 commit comments