Update TestDefaultIntrospectionResultAssembler.java
I have passed userInfo as null paramter and i am using parameters which are already used in the existing test cases. I have taken references from other test cases which are similar to @test(expected= error.class) format. Can you Kindly go through the test case and guide if this is the correct way and how to deal with parameter in this case.pull/1367/head
parent
e6bed2a481
commit
003fbed43e
|
@ -304,7 +304,17 @@ public class TestDefaultIntrospectionResultAssembler {
|
||||||
assertThat(result, is(equalTo(expected)));
|
assertThat(result, is(equalTo(expected)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = ParseException.class)
|
||||||
|
public void testAssembleFrom_refresh() {
|
||||||
|
|
||||||
|
OAuth2RefreshTokenEntity refreshToken = refreshToken(null,
|
||||||
|
oauth2AuthenticationWithUser(oauth2Request("clientId", scopes("foo", "bar")), "name"));
|
||||||
|
|
||||||
|
Set<String> authScopes = scopes("foo", "bar", "baz");
|
||||||
|
// this should fail with an error
|
||||||
|
assembler.assembleFrom(refreshToken, null , authScopes);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private UserInfo userInfo(String sub) {
|
private UserInfo userInfo(String sub) {
|
||||||
UserInfo userInfo = mock(UserInfo.class);
|
UserInfo userInfo = mock(UserInfo.class);
|
||||||
|
|
Loading…
Reference in New Issue