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 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()); } }
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 testGetResultForIdentity() { XooaClient xooaClient = new XooaClient(); xooaClient.setApiToken(XooaConstants.API_TOKEN); string resultId = "0a07e7e3-d87f-44d9-b9a8-d4bc3612b91e"; try { IdentityResponse identityResponse = xooaClient.getResultForIdentity(resultId); Assert.IsNotEmpty(identityResponse.getIdentityName()); Assert.IsNotEmpty(identityResponse.getCanManageIdentities().ToString()); Assert.IsNotEmpty(identityResponse.getId()); } catch (XooaRequestTimeoutException xrte) { Assert.IsNotEmpty(xrte.getResultUrl()); Assert.IsNotEmpty(xrte.getResultId()); Assert.AreEqual(resultId, xrte.getResultId()); } }