public void testEnrollIdentity() { XooaClient xooaClient = new XooaClient(); xooaClient.setApiToken(XooaConstants.API_TOKEN); try { var attrs = new List <attrs>(); attrs.Add(new attrs("sample", "value", false)); IdentityRequest request = new IdentityRequest("Kavi", "r", true, attrs); IdentityResponse identityResponse = xooaClient.enrollIdentity(request); identityResponse.display(); Assert.IsNotEmpty(identityResponse.getId()); Assert.IsNotEmpty(identityResponse.getIdentityName()); Assert.IsNotNull(identityResponse.getCanManageIdentities()); Assert.IsNotEmpty(identityResponse.getCreatedAt()); Assert.IsNotEmpty(identityResponse.getAccess()); Assert.IsNotEmpty(identityResponse.getAttrsList()); } catch (XooaRequestTimeoutException xrte) { Assert.IsNotEmpty(xrte.getResultId()); Assert.IsNotEmpty(xrte.getResultUrl()); } }
public void testCurrentIdentity() { XooaClient xooaClient = new XooaClient(); xooaClient.setApiToken(XooaConstants.API_TOKEN); try { IdentityResponse currentIdentity = xooaClient.currentIdentity(); Assert.IsNotEmpty(currentIdentity.getId()); Assert.IsNotEmpty(currentIdentity.getIdentityName()); Assert.IsNotNull(currentIdentity.getCanManageIdentities()); Assert.IsNotEmpty(currentIdentity.getCreatedAt()); Assert.IsNotEmpty(currentIdentity.getAccess()); Assert.IsNotEmpty(currentIdentity.getAttrsList()); } catch (XooaRequestTimeoutException xrte) { Assert.IsNotEmpty(xrte.getResultId()); Assert.IsNotEmpty(xrte.getResultUrl()); } }
public void testGetIdentities() { XooaClient xooaClient = new XooaClient(); xooaClient.setApiToken(XooaConstants.API_TOKEN); try { List <IdentityResponse> identities = xooaClient.getIdentities(); IdentityResponse identity = identities[0]; Assert.IsNotEmpty(identities); Assert.IsNotEmpty(identity.getId()); Assert.IsNotEmpty(identity.getIdentityName()); Assert.IsNotNull(identity.getCanManageIdentities()); Assert.IsNotEmpty(identity.getCreatedAt()); } catch (XooaRequestTimeoutException xrte) { Assert.IsNotEmpty(xrte.getResultId()); Assert.IsNotEmpty(xrte.getResultUrl()); } }
public void testGetIdentity() { XooaClient xooaClient = new XooaClient(); xooaClient.setApiToken(XooaConstants.API_TOKEN); try { IdentityResponse identityResponse = xooaClient.getIdentity("3c7d983f-6f9c-4599-802f-cd07dc977a7d"); Assert.IsNotEmpty(identityResponse.getId()); Assert.IsNotEmpty(identityResponse.getIdentityName()); Assert.IsNotNull(identityResponse.getCanManageIdentities()); Assert.IsNotEmpty(identityResponse.getCreatedAt()); Assert.IsNotEmpty(identityResponse.getAccess()); Assert.IsNotEmpty(identityResponse.getAttrsList()); } catch (XooaRequestTimeoutException xrte) { Assert.IsNotEmpty(xrte.getResultId()); Assert.IsNotEmpty(xrte.getResultUrl()); } }