当前位置: 首页>>代码示例>>C#>>正文


C# ITestOutputHelper类代码示例

本文整理汇总了C#中ITestOutputHelper的典型用法代码示例。如果您正苦于以下问题:C# ITestOutputHelper类的具体用法?C# ITestOutputHelper怎么用?C# ITestOutputHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ITestOutputHelper类属于命名空间,在下文中一共展示了ITestOutputHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoteMigrationsFacts

 public RemoteMigrationsFacts(ITestOutputHelper logHelper)
 {
     _logHelper = logHelper;
     _mockLogger = new MockLogger(logHelper);
     _migrator = new EfMigrator(PostgresFactConstants.DdlPath, PostgresFactConstants.ConfigName, PostgresFactConstants.AppConfig,
         PostgresFactConstants.InstanceConnectionString, PostgresFactConstants.ConnectionProvider, _mockLogger);
 }
开发者ID:Silvenga,项目名称:Cake.EntityFramework,代码行数:7,代码来源:RemoteMigrationsFacts.cs

示例2: CuratedFeedTest

 public CuratedFeedTest(ITestOutputHelper testOutputHelper)
     : base(testOutputHelper)
 {
     _commandlineHelper = new CommandlineHelper(TestOutputHelper);
     _clientSdkHelper = new ClientSdkHelper(TestOutputHelper);
     _packageCreationHelper = new PackageCreationHelper(TestOutputHelper);
 }
开发者ID:ZhiYuanHuang,项目名称:NuGetGallery,代码行数:7,代码来源:CuratedFeedTest.cs

示例3: JsonRpcIntegrationTestBase

		public JsonRpcIntegrationTestBase(ITestOutputHelper output) {
			this.output = output;

			var configs = new JsonRpcServerConfigurations() {
				BindingPort = port, //Interlocked.Increment(ref port),
				TransportProtocol = JsonRpcServerConfigurations.TransportMode.Bson
			};

			server = new JsonRpcServer<TestActionHandler>(configs);

			client = JsonRpcClient<TestActionHandler>.CreateClient("localhost", server.Configurations.BindingPort, JsonRpcServerConfigurations.TransportMode.Bson);
			client.Info.Username = "TestUser";

			client.OnAuthenticationRequest += (sender, e) => {
				e.Data = AUTH_TEXT;
			};

			server.OnAuthenticationVerification += (sender, e) => {
				e.Authenticated = true;
			};

			server.OnStop += (sender, e) => {
				wait.Set();
			};
		}
开发者ID:DJGosnell,项目名称:DtronixJsonRpc,代码行数:25,代码来源:JsonRpcIntegrationTestBase.cs

示例4: Ignore

        public static Output Ignore(ITestOutputHelper testOutputHelper)
        {
            if (ignore == null)
                ignore = new Output(testOutputHelper, "Ignore");

            return ignore;
        }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:Output.cs

示例5: SendPacketsAsync

        public SendPacketsAsync(ITestOutputHelper output)
        {
            _log = TestLogging.GetInstance();

            byte[] buffer = new byte[s_testFileSize];

            for (int i = 0; i < s_testFileSize; i++)
            {
                buffer[i] = (byte)(i % 255);
            }

            try
            {
                _log.WriteLine("Creating file {0} with size: {1}", TestFileName, s_testFileSize);
                using (FileStream fs = new FileStream(TestFileName, FileMode.CreateNew))
                {
                    fs.Write(buffer, 0, buffer.Length);
                }
            }
            catch (IOException)
            {
                // Test payload file already exists.
                _log.WriteLine("Payload file exists: {0}", TestFileName);
            }
        }
开发者ID:Corillian,项目名称:corefx,代码行数:25,代码来源:SendPacketsAsync.cs

示例6: RestoreAndBuildSinglePackageAsync

 /// <summary>
 /// Executes package restore and builds the test solution.
 /// </summary>
 /// <param name="scenarioName">The name of the scenario to build. If omitted, it will be the name of the calling method.</param>
 /// <param name="packageId">The leaf name of the project to be built or rebuilt, and the package ID to return after the build.</param>
 /// <param name="properties">Build properties to pass to MSBuild.</param>
 /// <returns>The single built package, or the package whose ID matches <paramref name="packageId"/>.</returns>
 public static async Task<IPackage> RestoreAndBuildSinglePackageAsync([CallerMemberName] string scenarioName = null, string packageId = null, IDictionary<string, string> properties = null, ITestOutputHelper testLogger = null)
 {
     var packages = await RestoreAndBuildPackagesAsync(scenarioName, packageId, properties, testLogger);
     return packageId == null
             ? packages.Single()
             : packages.Single(p => string.Equals(p.Id, packageId, StringComparison.OrdinalIgnoreCase));
 }
开发者ID:kovalikp,项目名称:nuproj,代码行数:14,代码来源:Scenario.cs

示例7: OrleansTaskSchedulerAdvancedTests_Set2

 public OrleansTaskSchedulerAdvancedTests_Set2(ITestOutputHelper output)
 {
     this.output = output;
     OrleansTaskSchedulerBasicTests.InitSchedulerLogging();
     context = new UnitTestSchedulingContext();
     masterScheduler = TestInternalHelper.InitializeSchedulerForTesting(context);
 }
开发者ID:PaulNorth,项目名称:orleans,代码行数:7,代码来源:OrleansTaskSchedulerAdvancedTests_Set2.cs

示例8: IntegrationTest

        public IntegrationTest(ITestOutputHelper writer)
        {
            if (File.Exists(output))
                File.Delete(output);

            this.writer = writer;
        }
开发者ID:kzu,项目名称:MSBuilder,代码行数:7,代码来源:IntegrationTest.cs

示例9: FlowTakeSpec

        public FlowTakeSpec(ITestOutputHelper helper) : base(helper)
        {
            var settings = ActorMaterializerSettings.Create(Sys).WithInputBuffer(2, 16);
            Materializer = ActorMaterializer.Create(Sys, settings);

            MuteDeadLetters(typeof(OnNext), typeof(OnComplete), typeof(RequestMore));
        }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:7,代码来源:FlowTakeSpec.cs

示例10: OutputLogger

        public OutputLogger(ITestOutputHelper testOutputHelper)
        {
            if (testOutputHelper == null)
                throw new ArgumentNullException(nameof(testOutputHelper));

            this.testOutputHelper = testOutputHelper;
        }
开发者ID:alexandrnikitin,项目名称:BenchmarkDotNet,代码行数:7,代码来源:OutputLogger.cs

示例11: NugetCommandLineTests

 public NugetCommandLineTests(ITestOutputHelper testOutputHelper)
     : base(testOutputHelper)
 {
     _clientSdkHelper = new ClientSdkHelper(testOutputHelper);
     _commandlineHelper = new CommandlineHelper(testOutputHelper);
     _packageCreationHelper = new PackageCreationHelper(testOutputHelper);
 }
开发者ID:goitsk,项目名称:NuGetGallery,代码行数:7,代码来源:NuGetCommandLineTests.cs

示例12: ExecuteAsync

        /// <summary>
        /// Builds a project.
        /// </summary>
        /// <param name="projectPath">The absolute path to the project.</param>
        /// <param name="targetsToBuild">The targets to build. If not specified, the project's default target will be invoked.</param>
        /// <param name="properties">The optional global properties to pass to the project. May come from the <see cref="MSBuild.Properties"/> static class.</param>
        /// <returns>A task whose result is the result of the build.</returns>
        public static async Task<BuildResultAndLogs> ExecuteAsync(string projectPath, string[] targetsToBuild = null, IDictionary<string, string> properties = null, ITestOutputHelper testLogger = null)
        {
            targetsToBuild = targetsToBuild ?? new string[0];

            var logger = new EventLogger();
            var logLines = new List<string>();
            var parameters = new BuildParameters
            {
                Loggers = new List<ILogger>
                {
                    new ConsoleLogger(LoggerVerbosity.Detailed, logLines.Add, null, null),
                    new ConsoleLogger(LoggerVerbosity.Minimal, v => testLogger?.WriteLine(v.TrimEnd()), null, null),
                    logger,
                },
            };

            BuildResult result;
            using (var buildManager = new BuildManager())
            {
                buildManager.BeginBuild(parameters);
                try
                {
                    var requestData = new BuildRequestData(projectPath, properties ?? Properties.Default, null, targetsToBuild, null);
                    var submission = buildManager.PendBuildRequest(requestData);
                    result = await submission.ExecuteAsync();
                }
                finally
                {
                    buildManager.EndBuild();
                }
            }

            return new BuildResultAndLogs(result, logger.LogEvents, logLines);
        }
开发者ID:NN---,项目名称:nuproj,代码行数:41,代码来源:MSBuild.cs

示例13: CXsltSettings

        public CXsltSettings(ITestOutputHelper output) : base(output)
        {
            // Make sure that we don't cache the value of the switch to enable testing
            AppContext.SetSwitch("TestSwitch.LocalAppContext.DisableCaching", true);

            _output = output;
        }
开发者ID:chcosta,项目名称:corefx,代码行数:7,代码来源:XsltSettings.cs

示例14: MigratorFacts

        public MigratorFacts(ITestOutputHelper logHelper)
        {
            _logHelper = logHelper;
            _mockLogger = new MockLogger(logHelper);

            _logHelper.WriteLine($"Using connectionString: {_instanceString}");
        }
开发者ID:Silvenga,项目名称:Cake.EntityFramework,代码行数:7,代码来源:MigratorFacts.cs

示例15: BulkheadSpecsHelper

        public BulkheadSpecsHelper(ITestOutputHelper testOutputHelper)
        {
#if !DEBUG 
            testOutputHelper = new SilentOutput();
#endif
            this.testOutputHelper = testOutputHelper;
        }
开发者ID:App-vNext,项目名称:Polly,代码行数:7,代码来源:BulkheadSpecsHelper.cs


注:本文中的ITestOutputHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。