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.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
@ -27,16 +25,12 @@ public class AuthenticationServiceTest {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private AuthenticationService authenticationService;
|
private AuthenticationService authenticationService;
|
||||||
|
|
||||||
@Value("${secureapi.jwt.expiration}")
|
private final String username = "testUser";
|
||||||
private long expirationTime;
|
private final String password = "testPass";
|
||||||
|
|
||||||
private User mockUser;
|
|
||||||
private String username = "testUser";
|
|
||||||
private String password = "testPass";
|
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
mockUser = new User();
|
User mockUser = new User();
|
||||||
mockUser.setUsername(username);
|
mockUser.setUsername(username);
|
||||||
mockUser.setPassword(new BCryptPasswordEncoder().encode(password));
|
mockUser.setPassword(new BCryptPasswordEncoder().encode(password));
|
||||||
when(userRepository.retrieveUserByUsername(anyString())).thenReturn(Optional.of(mockUser));
|
when(userRepository.retrieveUserByUsername(anyString())).thenReturn(Optional.of(mockUser));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user