Package org.openstack4j.api.identity.v3
Class KeystoneRoleServiceTests
- java.lang.Object
-
- org.openstack4j.api.AbstractTest
-
- org.openstack4j.api.identity.v3.KeystoneRoleServiceTests
-
public class KeystoneRoleServiceTests extends AbstractTest
Tests the Identity/Keystone API version 3 RoleService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.api.AbstractTest
AbstractTest.Service
-
-
Field Summary
-
Fields inherited from class org.openstack4j.api.AbstractTest
JSON_ACCESS, JSON_TOKEN, osv2, osv3, server, TOKEN_ID
-
-
Constructor Summary
Constructors Constructor Description KeystoneRoleServiceTests()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRoleToUserInProject_check_correct_response()voidaddRoletoUserInProject_projectIdMustBeNonNull()voidaddRoletoUserInProject_roleIdMustBeNonNull()voidaddRoletoUserInProject_userIdMustBeNonNull()voidcheckDomainUserRole_fail_Test()checks if a user has a role in domain contextvoidcheckDomainUserRole_success_Test()checks if a user has a role in domain contextvoidcheckProjectUserRole_fail_Test()checks if a user has a role in domain contextvoidcheckProjectUserRole_success_Test()checks if a user has a role in project contextvoidgrantDomainUserRole_fail_Test()try to grant a domain role to a user using a role that doesn't exist results in failing ActionResponsevoidgrantProjectUserRole_fail_Test()try to grant a project role to a user using role that doesn't exist results in failing ActionResponsevoidgrantRevokeDomainUserRole_Test()grants and revokes a role to/from a user in domain contextvoidgrantRevokeProjectUserRole_Test()grants and revokes a role to/from a user in project contextvoidlist_roles()voidlistRoleAssignments_Test()voidrevokeDomainUserRole_fail_Test()try to revoke a domain role from a user that isn't assigned to him results in failing ActionResponsevoidrevokeProjectUserRole_fail_Test()try to revoke a project role from a user that isn't assigned to him results in failing ActionResponsevoidrole_with_options()voidroles_empty_list_when_none_found()voidroles_getByName_with_null_throws_NullPointerException()voidroles_list_with_multiple_entries_for_list_of_roles()voidroles_one_entry_in_list_when_one_returned()protected AbstractTest.Serviceservice()voidupdateRole_Test()-
Methods inherited from class org.openstack4j.api.AbstractTest
afterTest, associateClientV2, associateClientV3, authURL, getResource, osv2, osv3, respondWith, respondWith, respondWith, respondWith, respondWith, respondWithCodeAndResource, respondWithHeaderAndResource, startServer, takeRequest
-
-
-
-
Method Detail
-
service
protected AbstractTest.Service service()
- Specified by:
servicein classAbstractTest- Returns:
- the service the API is using
-
roles_getByName_with_null_throws_NullPointerException
public void roles_getByName_with_null_throws_NullPointerException()
-
roles_empty_list_when_none_found
public void roles_empty_list_when_none_found() throws Exception- Throws:
Exception
-
roles_one_entry_in_list_when_one_returned
public void roles_one_entry_in_list_when_one_returned() throws Exception- Throws:
Exception
-
roles_list_with_multiple_entries_for_list_of_roles
public void roles_list_with_multiple_entries_for_list_of_roles() throws Exception- Throws:
Exception
-
addRoletoUserInProject_projectIdMustBeNonNull
public void addRoletoUserInProject_projectIdMustBeNonNull() throws Exception- Throws:
Exception
-
addRoletoUserInProject_userIdMustBeNonNull
public void addRoletoUserInProject_userIdMustBeNonNull() throws Exception- Throws:
Exception
-
addRoletoUserInProject_roleIdMustBeNonNull
public void addRoletoUserInProject_roleIdMustBeNonNull() throws Exception- Throws:
Exception
-
addRoleToUserInProject_check_correct_response
public void addRoleToUserInProject_check_correct_response() throws Exception- Throws:
Exception
-
checkProjectUserRole_success_Test
public void checkProjectUserRole_success_Test() throws Exceptionchecks if a user has a role in project context- Throws:
Exception
-
checkProjectUserRole_fail_Test
public void checkProjectUserRole_fail_Test() throws Exceptionchecks if a user has a role in domain context- Throws:
Exception
-
grantRevokeProjectUserRole_Test
public void grantRevokeProjectUserRole_Test() throws Exceptiongrants and revokes a role to/from a user in project context- Throws:
Exception
-
grantProjectUserRole_fail_Test
public void grantProjectUserRole_fail_Test() throws Exceptiontry to grant a project role to a user using role that doesn't exist results in failing ActionResponse- Throws:
Exception
-
revokeProjectUserRole_fail_Test
public void revokeProjectUserRole_fail_Test() throws Exceptiontry to revoke a project role from a user that isn't assigned to him results in failing ActionResponse- Throws:
Exception
-
checkDomainUserRole_success_Test
public void checkDomainUserRole_success_Test() throws Exceptionchecks if a user has a role in domain context- Throws:
Exception
-
checkDomainUserRole_fail_Test
public void checkDomainUserRole_fail_Test() throws Exceptionchecks if a user has a role in domain context- Throws:
Exception
-
grantRevokeDomainUserRole_Test
public void grantRevokeDomainUserRole_Test() throws Exceptiongrants and revokes a role to/from a user in domain context- Throws:
Exception
-
grantDomainUserRole_fail_Test
public void grantDomainUserRole_fail_Test() throws Exceptiontry to grant a domain role to a user using a role that doesn't exist results in failing ActionResponse- Throws:
Exception
-
revokeDomainUserRole_fail_Test
public void revokeDomainUserRole_fail_Test() throws Exceptiontry to revoke a domain role from a user that isn't assigned to him results in failing ActionResponse- Throws:
Exception
-
role_with_options
public void role_with_options() throws IOException- Throws:
IOException
-
-