コード例 #1
0
        public TestEnvironment(XunitTestAssemblyTask assemblyTask, bool disableAllConcurrency)
        {
            // Use the assembly in the folder that the user has specified, or, if not, use the assembly location
            var assemblyFolder = GetAssemblyFolder(ResharperConfiguration, assemblyTask);
            AssemblyPath = Path.Combine(assemblyFolder, Path.GetFileName(assemblyTask.AssemblyLocation));
            ConfigPath = GetConfigFile(AssemblyPath);

            Logger.LogVerbose("Setting current directory to {0}", assemblyFolder);

            Environment.CurrentDirectory = assemblyFolder;

            // Tell ReSharper about the shadow copy path, so it can clean up after abort. Xunit (1+2) will try and
            // clean up at the end of the run
            ShadowCopyPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

            // The hosts require disabling concurrency (e.g. code coverage, continuous testing, dotMemoryUnit)
            DisableAllConcurrency = disableAllConcurrency;

            TestAssemblyConfiguration = GetXunitConfiguration(AssemblyPath, ConfigPath);
            MergeConfiguration();
            DiagnosticMessages = new DiagnosticMessages(TestAssemblyConfiguration.DiagnosticMessagesOrDefault);
        }
コード例 #2
0
        public TestEnvironment(XunitTestAssemblyTask assemblyTask, bool disableAllConcurrency)
        {
            // Use the assembly in the folder that the user has specified, or, if not, use the assembly location
            var assemblyFolder = GetAssemblyFolder(ResharperConfiguration, assemblyTask);

            AssemblyPath = Path.Combine(assemblyFolder, Path.GetFileName(assemblyTask.AssemblyLocation));
            ConfigPath   = GetConfigFile(AssemblyPath);

            Logger.LogVerbose("Setting current directory to {0}", assemblyFolder);

            Environment.CurrentDirectory = assemblyFolder;

            // Tell ReSharper about the shadow copy path, so it can clean up after abort. Xunit (1+2) will try and
            // clean up at the end of the run
            ShadowCopyPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

            // The hosts require disabling concurrency (e.g. code coverage, continuous testing, dotMemoryUnit)
            DisableAllConcurrency = disableAllConcurrency;

            TestAssemblyConfiguration = GetXunitConfiguration(AssemblyPath, ConfigPath);
            MergeConfiguration();
            DiagnosticMessages = new DiagnosticMessages(TestAssemblyConfiguration.DiagnosticMessagesOrDefault);
        }