Class BaseTest

java.lang.Object
io.jans.configapi.core.test.BaseTest

public class BaseTest extends Object
  • Field Details

  • Constructor Details

    • BaseTest

      public BaseTest()
  • Method Details

    • initTestSuite

      @BeforeSuite public void initTestSuite(org.testng.ITestContext context)
    • getAccessToken

      @BeforeMethod public void getAccessToken()
    • getAccessTokenForGivenScope

      public String getAccessTokenForGivenScope(String scopes)
    • getToken

      protected String getToken(String tokenUrl, String clientId, String clientSecret, io.jans.as.model.common.GrantType grantType, String scopes)
    • getIssuer

      protected String getIssuer()
    • 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.
    • decodeFileValue

      protected String decodeFileValue(String value)
    • isServiceDeployed

      protected boolean isServiceDeployed(String serviceName)
    • isEndpointAvailable

      protected boolean isEndpointAvailable(String url, String accessToken)
    • executeGet

      protected jakarta.ws.rs.core.Response executeGet(String url, String clientId, String clientSecret, String authType, String authCode, Map<String,String> parameters, org.apache.http.entity.ContentType contentType)