예제 #1
0
        public void Configure(TestConfiguration aTestConfiguration, TestEnvironment aTestEnvironment)
        {
            var testDiscovery = new TestDiscovery(aTestEnvironment.CustomArguments);
            var testExecution = new TestExecution(aTestEnvironment.CustomArguments);

            aTestConfiguration.Conventions.Add(testDiscovery, testExecution);
        }
예제 #2
0
 /// <summary>
 /// we use a service collection to create the test classes. This method registers them by scanning the
 /// entry assembly.
 /// </summary>
 /// <remarks>This Filter uses the same one used in <see cref="TestDiscovery"/> </remarks>
 /// <param name="aServiceCollection"></param>
 private static void RegisterTests(ServiceCollection aServiceCollection)
 {
     aServiceCollection.Scan
     (
         aTypeSourceSelector => aTypeSourceSelector
         .FromEntryAssembly()
         .AddClasses(action: (aClasses) => aClasses.Where(TestDiscovery.TestClassFilter()))
         .AsSelf()
         .WithScopedLifetime()
     );
 }