コード例 #1
0
        public TestService(ITestOutputHelper output)
        {
            this.LogProvider   = new TestLogProvider(output);
            this.loggerFactory = LoggerFactory.Create(builder =>
            {
                builder.AddProvider(this.LogProvider);
            });

            this.testName = SharedTestHelpers.GetTestName(output);
            this.OrchestrationServiceOptions = new SqlOrchestrationServiceSettings(
                SharedTestHelpers.GetDefaultConnectionString())
            {
                LoggerFactory             = this.loggerFactory,
                CreateDatabaseIfNotExists = true,
            };
        }
コード例 #2
0
        public TestService(ITestOutputHelper output)
        {
            Type      type       = output.GetType();
            FieldInfo testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic);
            var       test       = (ITest)testMember.GetValue(output);

            this.LogProvider   = new TestLogProvider(output);
            this.loggerFactory = LoggerFactory.Create(builder =>
            {
                builder.AddProvider(this.LogProvider);
            });

            this.testName = test.TestCase.TestMethod.Method.Name;
            this.OrchestrationServiceOptions = new SqlOrchestrationServiceSettings(
                SharedTestHelpers.GetDefaultConnectionString())
            {
                LoggerFactory = this.loggerFactory,
            };
        }