Update spring-boot 2.4.2 , update config test
parent
a9f4e6ef7a
commit
f6e0922f7c
|
@ -2,12 +2,15 @@ package com.monkeyk.sos.service.business;
|
||||||
|
|
||||||
import com.monkeyk.sos.service.dto.AccessTokenDto;
|
import com.monkeyk.sos.service.dto.AccessTokenDto;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.function.Executable;
|
||||||
|
import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,9 +65,12 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
params.put("password", "password");
|
params.put("password", "password");
|
||||||
|
|
||||||
PasswordInlineAccessTokenInvoker accessTokenInvoker = new PasswordInlineAccessTokenInvoker();
|
PasswordInlineAccessTokenInvoker accessTokenInvoker = new PasswordInlineAccessTokenInvoker();
|
||||||
|
assertThrows(InvalidGrantException.class, () -> {
|
||||||
final AccessTokenDto tokenDto = accessTokenInvoker.invoke(params);
|
final AccessTokenDto tokenDto = accessTokenInvoker.invoke(params);
|
||||||
|
|
||||||
assertNull(tokenDto);
|
assertNull(tokenDto);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// System.out.println(accessTokenDto);
|
// System.out.println(accessTokenDto);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue