/// <summary> /// Initializes a new instance of the <see cref="XunitTestFrameworkExecutor"/> class. /// </summary> /// <param name="assemblyName">Name of the test assembly.</param> /// <param name="sourceInformationProvider">The source line number information provider.</param> public XunitTestFrameworkExecutor(AssemblyName assemblyName, ISourceInformationProvider sourceInformationProvider) : base(assemblyName, sourceInformationProvider) { string config = null; #if !WINDOWS_PHONE_APP config = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; #endif TestAssembly = new XunitTestAssembly(AssemblyInfo, config); }
/// <summary> /// Initializes a new instance of the <see cref="XunitTestFrameworkDiscoverer"/> class. /// </summary> /// <param name="assemblyInfo">The test assembly.</param> /// <param name="sourceProvider">The source information provider.</param> /// <param name="collectionFactory">The test collection factory used to look up test collections.</param> /// <param name="messageAggregator">The message aggregator to receive environmental warnings from.</param> public XunitTestFrameworkDiscoverer(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IXunitTestCollectionFactory collectionFactory, IMessageAggregator messageAggregator) : base(assemblyInfo, sourceProvider, messageAggregator) { var collectionBehaviorAttribute = assemblyInfo.GetCustomAttributes(typeof(CollectionBehaviorAttribute)).SingleOrDefault(); var disableParallelization = collectionBehaviorAttribute == null ? false : collectionBehaviorAttribute.GetNamedArgument<bool>("DisableTestParallelization"); string config = null; #if !WINDOWS_PHONE_APP config = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; #endif var testAssembly = new XunitTestAssembly(assemblyInfo, config); TestCollectionFactory = collectionFactory ?? ExtensibilityPointFactory.GetXunitTestCollectionFactory(collectionBehaviorAttribute, testAssembly); TestFrameworkDisplayName = String.Format("{0} [{1}, {2}]", DisplayName, TestCollectionFactory.DisplayName, disableParallelization ? "non-parallel" : "parallel"); }
/// <summary> /// Initializes a new instance of the <see cref="XunitTestFrameworkDiscoverer"/> class. /// </summary> /// <param name="assemblyInfo">The test assembly.</param> /// <param name="sourceProvider">The source information provider.</param> /// <param name="collectionFactory">The test collection factory used to look up test collections.</param> /// <param name="messageAggregator">The message aggregator to receive environmental warnings from.</param> public XunitTestFrameworkDiscoverer(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IXunitTestCollectionFactory collectionFactory, IMessageAggregator messageAggregator) : base(assemblyInfo, sourceProvider, messageAggregator) { var collectionBehaviorAttribute = assemblyInfo.GetCustomAttributes(typeof(CollectionBehaviorAttribute)).SingleOrDefault(); var disableParallelization = collectionBehaviorAttribute == null ? false : collectionBehaviorAttribute.GetNamedArgument <bool>("DisableTestParallelization"); string config = null; #if !WINDOWS_PHONE_APP config = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; #endif var testAssembly = new XunitTestAssembly(assemblyInfo, config); TestCollectionFactory = collectionFactory ?? ExtensibilityPointFactory.GetXunitTestCollectionFactory(collectionBehaviorAttribute, testAssembly); TestFrameworkDisplayName = String.Format("{0} [{1}, {2}]", DisplayName, TestCollectionFactory.DisplayName, disableParallelization ? "non-parallel" : "parallel"); }