本文整理汇总了C#中ITestOutputHelper类的典型用法代码示例。如果您正苦于以下问题:C# ITestOutputHelper类的具体用法?C# ITestOutputHelper怎么用?C# ITestOutputHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITestOutputHelper类属于命名空间,在下文中一共展示了ITestOutputHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: PersistenceSpec
protected PersistenceSpec(Config config = null, ITestOutputHelper output = null)
: base(config, output)
{
_name = NamePrefix + "-" + _counter.GetAndIncrement();
Clean = new Cleanup(this);
Clean.Initialize();
}
开发者ID:Micha-kun,项目名称:akka.net,代码行数:7,代码来源:PersistenceSpec.cs
示例17: TaskAppServiceTests
public TaskAppServiceTests(ITestOutputHelper output)
{
this.output = output;
this._taskAppService = Resolve<ITaskAppService>();
this._userAppService = Resolve<ITaskeverUserAppService>();
}
开发者ID:flaithbheartaigh,项目名称:taskever,代码行数:7,代码来源:TaskAppServiceTests.cs
示例18: CSharpExampleFileTests
public CSharpExampleFileTests(ITestOutputHelper output)
{
_output = output;
var subject = new CSharpLexer();
_results = subject.GetTokens(SampleFile.Load("csharp-sample.txt"))
.ToArray();
}
开发者ID:akatakritos,项目名称:PygmentSharp,代码行数:7,代码来源:CSharpExampleFileTests.cs
示例19: HarvestPackageTests
public HarvestPackageTests(ITestOutputHelper output)
{
_log = new Log(output);
_engine = new TestBuildEngine(_log);
_frameworks = new[]
{
CreateFrameworkItem("netcoreapp1.0", "win7-x86;win7-x64;osx.10.11-x64;centos.7-x64;debian.8-x64;linuxmint.17-x64;opensuse.13.2-x64;rhel.7.2-x64;ubuntu.14.04-x64;ubuntu.16.04-x64"),
CreateFrameworkItem("netcoreapp1.1", "win7-x86;win7-x64;osx.10.11-x64;centos.7-x64;debian.8-x64;linuxmint.17-x64;opensuse.13.2-x64;rhel.7.2-x64;ubuntu.14.04-x64;ubuntu.16.04-x64"),
CreateFrameworkItem("netcore50", "win10-x86;win10-x86-aot;win10-x64;win10-x64-aot;win10-arm;win10-arm-aot"),
CreateFrameworkItem("netcore45", ""),
CreateFrameworkItem("netcore451", ""),
CreateFrameworkItem("net45", ";win-x86;win-x64"),
CreateFrameworkItem("net451", ";win-x86;win-x64"),
CreateFrameworkItem("net46", ";win-x86;win-x64;win7-x86;win7-x64"),
CreateFrameworkItem("net461", ";win-x86;win-x64;win7-x86;win7-x64"),
CreateFrameworkItem("net462", ";win-x86;win-x64;win7-x86;win7-x64"),
CreateFrameworkItem("net463", ";win-x86;win-x64;win7-x86;win7-x64"),
CreateFrameworkItem("wpa81", ""),
CreateFrameworkItem("wp8", ""),
CreateFrameworkItem("MonoAndroid10", ""),
CreateFrameworkItem("MonoTouch10", ""),
CreateFrameworkItem("xamarinios10", ""),
CreateFrameworkItem("xamarinmac20", ""),
CreateFrameworkItem("xamarintvos10", ""),
CreateFrameworkItem("xamarinwatchos10", "")
};
}
开发者ID:roncain,项目名称:buildtools,代码行数:31,代码来源:HarvestPackageTests.cs
示例20: XunitTestLogger
public XunitTestLogger(ITestOutputHelper outputHelper, Config config) : base(entry =>
{
if (config.Verbose || entry.Severity != Severity.Debug)
LogEntryWriter.Write(entry, outputHelper);
})
{
}
开发者ID:jochenz,项目名称:unit-testing-restful-services,代码行数:7,代码来源:XunitTestLogger.cs
注:本文中的ITestOutputHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论