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 String
accessToken
protected static String
AUTHORIZATION
protected static String
AUTHORIZATION_TYPE
protected org.apache.commons.codec.binary.Base64
base64
protected static String
CONTENT_TYPE
protected HttpService
httpService
protected org.apache.logging.log4j.Logger
log
protected static Map<String,String>
propertiesMap
protected ResteasyService
resteasyService
protected TokenService
tokenService
-
Constructor Summary
Constructors Constructor Description BaseTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
decodeFileValue(String value)
void
finalize()
void
getAccessToken()
protected String
getCredentials(String clientId, String clientSecret)
protected String
getEncodedCredentials()
Returns the client credentials encoded using base64.protected HttpService
getHttpService()
protected ResteasyService
getResteasyService()
protected String
getToken(String tokenUrl, String clientId, String clientSecret, io.jans.as.model.common.GrantType grantType, String scopes)
protected TokenService
getTokenService()
void
initTestSuite(org.testng.ITestContext context)
protected boolean
isServiceDeployed(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)
-
-