Removed unnecessary line breaks
This commit is contained in:
parent
a4c71eccb1
commit
c0f0467e4a
@ -6,12 +6,10 @@ import de.w665.sharepulse.service.AuthenticationService;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
@ -27,16 +25,12 @@ public class AuthenticationServiceTest {
|
||||
@Autowired
|
||||
private AuthenticationService authenticationService;
|
||||
|
||||
@Value("${secureapi.jwt.expiration}")
|
||||
private long expirationTime;
|
||||
|
||||
private User mockUser;
|
||||
private String username = "testUser";
|
||||
private String password = "testPass";
|
||||
private final String username = "testUser";
|
||||
private final String password = "testPass";
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
mockUser = new User();
|
||||
User mockUser = new User();
|
||||
mockUser.setUsername(username);
|
||||
mockUser.setPassword(new BCryptPasswordEncoder().encode(password));
|
||||
when(userRepository.retrieveUserByUsername(anyString())).thenReturn(Optional.of(mockUser));
|
||||
|
Loading…
x
Reference in New Issue
Block a user