private void InitRunner(ITest testTree) { //We give the EditMode platform here so we dont suddenly create Playmode work items in the test Runner. m_Runner = (UnityTestAssemblyRunnerFactory ?? new UnityTestAssemblyRunnerFactory()).Create(TestPlatform.EditMode, new EditmodeWorkItemFactory()); m_Runner.LoadTestTree(testTree); hideFlags |= HideFlags.DontSave; EnumerableSetUpTearDownCommand.ActivePcHelper = new EditModePcHelper(); OuterUnityTestActionCommand.ActivePcHelper = new EditModePcHelper(); }
private void InitRunner() { //We give the EditMode platform here so we dont suddenly create Playmode work items in the test Runner. m_Runner = (UnityTestAssemblyRunnerFactory ?? new UnityTestAssemblyRunnerFactory()).Create(TestPlatform.EditMode, new EditmodeWorkItemFactory()); var testAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); var assemblies = testAssemblyProvider.GetAssembliesGroupedByType(m_TestPlatform).Select(x => x.Assembly).ToArray(); var loadedTests = m_Runner.Load(assemblies, UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(m_TestPlatform)); loadedTests.ParseForNameDuplicates(); hideFlags |= HideFlags.DontSave; EnumerableSetUpTearDownCommand.ActivePcHelper = new EditModePcHelper(); OuterUnityTestActionCommand.ActivePcHelper = new EditModePcHelper(); }