In user tests it should be easy to switch Identity for a single test method (or
test class): @TestAsIdentity(username = "...")
------------------------------------------------------------------------------------------------------------------------------
Key: SEAMSECURITY-104
URL: https://issues.jboss.org/browse/SEAMSECURITY-104
Project: Seam Security
Issue Type: Feature Request
Reporter: Geoffrey De Smet
Writing tests for different users, different roles and/or different groups
should be easy.
Ideally, we want something like this:
{code}
@Test @TestAsIdentity("admin")
public void testAdminActionByAdmin() {
adminService.doSomething();
}
@Test(expectedException = AuthorizationException.class) @TestAsIdentity("john")
public void testAdminActionByMember() {
adminService.doSomething();
}
{code}
Create a seam-security-junit module on which a user project can depend on with
scope=test to use that @TestAsIdentity and other annotations.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues