public void Issue12() { // Issue #12: PrincipalPermissionAttribute causes InvalidCastException when applied to service methods // http://code.google.com/p/jayrock/issues/detail?id=12 SecuredService service = new SecuredService(); Method method = service.GetClass().GetMethodByName("SecuredMethod"); try { method.Invoke(service, null, null); } catch (TargetMethodException e) { Assert.IsNotNull(e.InnerException); throw e.InnerException; } }
public void Issue12() { // Issue #12: PrincipalPermissionAttribute causes InvalidCastException when applied to service methods // http://code.google.com/p/jayrock/issues/detail?id=12 SecuredService service = new SecuredService(); Method method = service.GetClass().GetMethodByName("SecuredMethod"); try { method.Invoke(service, null, null); } catch (TargetMethodException e) { Assert.IsNotNull(e.InnerException); throw e.InnerException; } }