public void DangerousCodeInherit()
        {
            var playerType = new PlayerCompiler().Compile(TestCode.DangerousCodeInherit);
            var def        = AssemblyDefinition.ReadAssembly(playerType.Assembly.Location);

            try {
                new WhitelistValidator().Invoking(x => x.Validate(def)).ShouldThrow <CodeExecutionException>();
            } finally {
                File.Delete(playerType.Assembly.Location);
            }
        }
Пример #2
0
 public void Before()
 {
     compiler = new PlayerCompiler();
 }