Add project files.

This commit is contained in:
2025-08-18 17:11:43 +03:30
parent 807dc263be
commit e5eb10d604
3943 changed files with 223719 additions and 0 deletions
@@ -0,0 +1,30 @@
using Elsa.Testing.Shared;
using Elsa.Workflows.Activities;
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;
namespace Elsa.Workflows.IntegrationTests.Activities;
public class WriteLineTests
{
private readonly IWorkflowRunner _workflowRunner;
private readonly CapturingTextWriter _capturingTextWriter = new();
private readonly IServiceProvider _services;
public WriteLineTests(ITestOutputHelper testOutputHelper)
{
_services = new TestApplicationBuilder(testOutputHelper).WithCapturingTextWriter(_capturingTextWriter).Build();
_workflowRunner = _services.GetRequiredService<IWorkflowRunner>();
}
[Fact(DisplayName = "Run a simple workflow")]
public async Task Test1()
{
var expectedOutput = "Hello World!";
var workflow = Workflow.FromActivity(new WriteLine(expectedOutput));
await _services.PopulateRegistriesAsync();
await _workflowRunner.RunAsync(workflow);
var line = _capturingTextWriter.Lines.FirstOrDefault();
Assert.Equal(expectedOutput, line);
}
}