/// <summary> /// Initializes a new instance of the <see cref="CollectionPerAssemblyTestCollectionFactory" /> class. /// </summary> /// <param name="testAssembly">The assembly.</param> /// <param name="diagnosticMessageSink">The message sink used to send diagnostic messages</param> public CollectionPerAssemblyTestCollectionFactory(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink) { this.testAssembly = testAssembly; defaultCollection = new TestCollection(testAssembly, null, "Test collection for " + Path.GetFileName(testAssembly.Assembly.AssemblyPath)); collectionDefinitions = TestCollectionFactoryHelper.GetTestCollectionDefinitions(testAssembly.Assembly, diagnosticMessageSink); }
internal ITestClass CreateTestClass(ITypeInfo @class, Guid testCollectionUniqueId) { // This method is called for special fact deserialization, to ensure that the test collection unique // ID lines up with the ones that will be deserialized through normal mechanisms. var discoveredTestCollection = TestCollectionFactory.Get(@class); var testCollection = new TestCollection(discoveredTestCollection.TestAssembly, discoveredTestCollection.CollectionDefinition, discoveredTestCollection.DisplayName, testCollectionUniqueId); return(new TestClass(testCollection, @class)); }