use of gov.ca.cwds.test.support.PerryV2DevModeTokenProvider in project cals-api by ca-cwds.
the class RestClientTestRule method prepareForTesting.
private void prepareForTesting() {
if (TestModeUtils.isIntegrationTestsMode()) {
try {
String principal = fixture("security/default-login-principal.json");
defaultAuthParams = new JsonIdentityAuthParams(principal);
tokenProvider = new PerryV2DevModeTokenProvider(client, TestModeUtils.perryUrl(), TestModeUtils.loginFormTargetUrl());
} catch (Exception e) {
LOG.warn("Cannot generate token");
LOG.error(e.getMessage(), e);
}
}
}
Aggregations