@Test @RoleAuthStamp(except = {"C", "H"}) public void role_CH() { AuthError ae = null; ae = roleAuth.checkAuthentication(this.getClass(), findMethod("role_CH"), null); assertNotNull(ae); assertEquals(AuthError.WebCtrlRole, ae.getError()); assertEquals("class-error", ae.getErrorCode()); }
@Test @RoleAuthStamp( value = {"A", "B"}, error = "method-error") public void roleAB() { AuthError ae = null; ae = roleAuth.checkAuthentication(this.getClass(), findMethod("roleAB"), null); assertNotNull(ae); assertEquals(AuthError.WebCtrlRole, ae.getError()); assertEquals("method-error", ae.getErrorCode()); }