public void Correctly_determines_permissions() { // Execution has to be always granted. Otherwise this code wouldn't run in the first place. var securityPermission = new SecurityPermission(SecurityPermissionFlag.Execution); Assert.IsTrue(securityPermission.IsGranted()); }