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); } }
public void Before() { compiler = new PlayerCompiler(); }