1 25 package org.objectweb.easybeans.tests.security; 26 27 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.security.ItfSecurityRolesTester; 28 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.security.SFSBSecurityRolesTester01; 29 import org.objectweb.easybeans.tests.common.helper.EJBHelper; 30 import org.testng.annotations.BeforeMethod; 31 import org.testng.annotations.Test; 32 33 44 public class TestSLAnnotationSecurityRoles { 45 46 49 private ItfSecurityRolesTester tester; 50 51 55 @BeforeMethod 56 public void setup() throws Exception { 57 tester = EJBHelper.getBeanRemoteInstance(SFSBSecurityRolesTester01.class, ItfSecurityRolesTester.class); 58 } 59 60 66 @Test 67 public void testPermitAll() { 68 tester.testPermitAll(); 69 } 70 71 78 @Test 79 public void testDenyAll() { 80 tester.testDenyAll(); 81 } 82 83 84 89 @Test 90 public void testAllowedRolesWithOneRole() { 91 tester.testAllowedRolesWithOneRole(); 92 } 93 94 99 @Test 100 public void testAllowedRolesWithTwoRoles() { 101 tester.testAllowedRolesWithTwoRoles(); 102 } 103 104 110 @Test 111 public void testGetCallerIdentity() { 112 tester.testGetCallerIdentity(); 113 } 114 115 123 @Test 124 public void testGetCallerPrincipalDifferentCaller() { 125 tester.testGetCallerPrincipalDifferentCaller(); 126 } 127 128 135 @Test 136 public void testGetCallerPrincipalSameCaller() { 137 tester.testGetCallerPrincipalSameCaller(); 138 } 139 140 147 @Test 148 public void testIsCallerInRoleCorrect() { 149 tester.testIsCallerInRoleCorrect(); 150 } 151 152 159 @Test 160 public void testIsCallerInRoleDeprecated() { 161 tester.testIsCallerInRoleDeprecated(); 162 } 163 164 171 @Test 172 public void testIsCallerInRoleIncorrect() { 173 tester.testIsCallerInRoleIncorrect(); 174 } 175 } 176 | Popular Tags |