示例#1
0
        public void GetExecutorExtensionManagerShouldReturnAnExecutionManagerWithExtensions()
        {
            var extensionManager =
                TestExecutorExtensionManager.GetExecutionExtensionManager(
                    typeof(TestExecutorExtensionManagerTests).GetTypeInfo().Assembly.Location);

            Assert.IsNotNull(extensionManager.TestExtensions);
            Assert.IsTrue(extensionManager.TestExtensions.Count() > 0);
        }
示例#2
0
        private TestExecutorExtensionManager GetExecutorExtensionManager(string extensionAssembly)
        {
            try
            {
                if (string.IsNullOrEmpty(extensionAssembly) ||
                    string.Equals(extensionAssembly, Constants.UnspecifiedAdapterPath))
                {
                    // full execution. Since the extension manager is cached this can be created multiple times without harming performance.
                    return(TestExecutorExtensionManager.Create());
                }
                else
                {
                    return(TestExecutorExtensionManager.GetExecutionExtensionManager(extensionAssembly));
                }
            }
            catch (Exception ex)
            {
                EqtTrace.Error(
                    "BaseRunTests: GetExecutorExtensionManager: Exception occurred while loading extensions {0}",
                    ex);

                return(null);
            }
        }