Exemplo n.º 1
0
    public override void SimulateController()
    {
        ITestCommandInput input = TestCommand.Create();

        input.Forward = Input.GetKey(KeyCode.W);
        input.Back    = Input.GetKey(KeyCode.S);
        input.Left    = Input.GetKey(KeyCode.A);
        input.Right   = Input.GetKey(KeyCode.D);

        entity.QueueInput(input);
    }
        public void Run(ITest test)
        {
            var appDomain = AppDomain.CreateDomain("TestRunnerNew");

            appDomain.Load(new AssemblyName(runner.GetType().Assembly.FullName)); //TODO: move this to the TestCommand
            //appDomain.Load(test.TestAssembly.FullName);

            var callback = TestCommand.Create(runner, test);

            appDomain.DoCallBack(callback.Run);


            try
            {
                AppDomain.Unload(appDomain);// this causes crashes in character controllers?
            }
            catch (Exception unloadEx)
            {
                Console.WriteLine(unloadEx);
            }
        }