本文整理汇总了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);
}
示例2: CuratedFeedTest
public CuratedFeedTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
_commandlineHelper = new CommandlineHelper(TestOutputHelper);
_clientSdkHelper = new ClientSdkHelper(TestOutputHelper);
_packageCreationHelper = new PackageCreationHelper(TestOutputHelper);
}
示例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();
};
}
示例4: Ignore
public static Output Ignore(ITestOutputHelper testOutputHelper)
{
if (ignore == null)
ignore = new Output(testOutputHelper, "Ignore");
return ignore;
}
示例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);
}
}
示例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));
}
示例7: OrleansTaskSchedulerAdvancedTests_Set2
public OrleansTaskSchedulerAdvancedTests_Set2(ITestOutputHelper output)
{
this.output = output;
OrleansTaskSchedulerBasicTests.InitSchedulerLogging();
context = new UnitTestSchedulingContext();
masterScheduler = TestInternalHelper.InitializeSchedulerForTesting(context);
}
示例8: IntegrationTest
public IntegrationTest(ITestOutputHelper writer)
{
if (File.Exists(output))
File.Delete(output);
this.writer = writer;
}
示例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));
}
示例10: OutputLogger
public OutputLogger(ITestOutputHelper testOutputHelper)
{
if (testOutputHelper == null)
throw new ArgumentNullException(nameof(testOutputHelper));
this.testOutputHelper = testOutputHelper;
}
示例11: NugetCommandLineTests
public NugetCommandLineTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
_clientSdkHelper = new ClientSdkHelper(testOutputHelper);
_commandlineHelper = new CommandlineHelper(testOutputHelper);
_packageCreationHelper = new PackageCreationHelper(testOutputHelper);
}
示例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);
}
示例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;
}
示例14: MigratorFacts
public MigratorFacts(ITestOutputHelper logHelper)
{
_logHelper = logHelper;
_mockLogger = new MockLogger(logHelper);
_logHelper.WriteLine($"Using connectionString: {_instanceString}");
}
示例15: BulkheadSpecsHelper
public BulkheadSpecsHelper(ITestOutputHelper testOutputHelper)
{
#if !DEBUG
testOutputHelper = new SilentOutput();
#endif
this.testOutputHelper = testOutputHelper;
}