-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jans-auth-server): corrected npe in response type class
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
jans-auth-server/model/src/test/java/io/jans/as/model/common/ResponseTypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package io.jans.as.model.common; | ||
|
||
import org.testng.Assert; | ||
import org.testng.annotations.Test; | ||
|
||
import static org.testng.Assert.assertFalse; | ||
import static org.testng.Assert.assertTrue; | ||
|
||
/** | ||
* @author Yuriy Zabrovarnyy | ||
*/ | ||
public class ResponseTypeTest { | ||
|
||
|
||
@Test | ||
public void isImplicitFlow_withNull_shouldReturnFalseWithoutException() { | ||
assertFalse(ResponseType.isImplicitFlow(null)); | ||
} | ||
|
||
@Test | ||
public void isImplicitFlow_withBlankValue_shouldReturnFalse() { | ||
assertFalse(ResponseType.isImplicitFlow("")); | ||
} | ||
|
||
@Test | ||
public void isImplicitFlow_withUnknownValue_shouldReturnFalse() { | ||
assertFalse(ResponseType.isImplicitFlow("dfs")); | ||
} | ||
|
||
@Test | ||
public void isImplicitFlow_withTokenAndIdTokenValue_shouldReturnTrue() { | ||
assertTrue(ResponseType.isImplicitFlow("token id_token")); | ||
} | ||
} |