Package io.jans.configapi.core.test
Class BaseTest
- java.lang.Object
-
- io.jans.configapi.core.test.BaseTest
-
public class BaseTest extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected StringaccessTokenprotected static StringAUTHORIZATIONprotected static StringAUTHORIZATION_TYPEprotected org.apache.commons.codec.binary.Base64base64protected static StringCONTENT_TYPEprotected HttpServicehttpServiceprotected org.apache.logging.log4j.Loggerlogprotected static Map<String,String>propertiesMapprotected ResteasyServiceresteasyServiceprotected TokenServicetokenService
-
Constructor Summary
Constructors Constructor Description BaseTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdecodeFileValue(String value)voidfinalize()voidgetAccessToken()protected StringgetCredentials(String clientId, String clientSecret)protected StringgetEncodedCredentials()Returns the client credentials encoded using base64.protected HttpServicegetHttpService()protected ResteasyServicegetResteasyService()protected StringgetToken(String tokenUrl, String clientId, String clientSecret, io.jans.as.model.common.GrantType grantType, String scopes)protected TokenServicegetTokenService()voidinitTestSuite(org.testng.ITestContext context)protected booleanisServiceDeployed(String serviceName)
-
-
-
Field Detail
-
CONTENT_TYPE
protected static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
AUTHORIZATION
protected static final String AUTHORIZATION
- See Also:
- Constant Field Values
-
AUTHORIZATION_TYPE
protected static final String AUTHORIZATION_TYPE
- See Also:
- Constant Field Values
-
log
protected org.apache.logging.log4j.Logger log
-
base64
protected org.apache.commons.codec.binary.Base64 base64
-
resteasyService
protected ResteasyService resteasyService
-
httpService
protected HttpService httpService
-
tokenService
protected TokenService tokenService
-
accessToken
protected String accessToken
-
-
Method Detail
-
initTestSuite
@BeforeSuite public void initTestSuite(org.testng.ITestContext context) throws Exception- Throws:
Exception
-
getToken
protected String getToken(String tokenUrl, String clientId, String clientSecret, io.jans.as.model.common.GrantType grantType, String scopes)
-
getHttpService
protected HttpService getHttpService()
-
getResteasyService
protected ResteasyService getResteasyService()
-
getTokenService
protected TokenService getTokenService()
-
getCredentials
protected String getCredentials(String clientId, String clientSecret) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getEncodedCredentials
protected String getEncodedCredentials()
Returns the client credentials encoded using base64.- Returns:
- The encoded client credentials.
-
isServiceDeployed
protected boolean isServiceDeployed(String serviceName)
-
-