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,31 @@
using Elsa.Testing.Shared;
using Elsa.Workflows.Management;
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;
namespace Elsa.Workflows.IntegrationTests.Scenarios.Serialization;
public class Tests
{
private readonly CapturingTextWriter _capturingTextWriter = new();
private readonly IServiceProvider _services;
private readonly IWorkflowDefinitionPublisher _publisher;
private readonly IActivitySerializer _serializer;
public Tests(ITestOutputHelper testOutputHelper)
{
_services = new TestApplicationBuilder(testOutputHelper).WithCapturingTextWriter(_capturingTextWriter).Build();
_services.GetRequiredService<IWorkflowBuilderFactory>();
_publisher = _services.GetRequiredService<IWorkflowDefinitionPublisher>();
_serializer = _services.GetRequiredService<IActivitySerializer>();
}
[Fact(DisplayName = "Can serialize newly created workflow definition")]
public async Task Test1()
{
await _services.PopulateRegistriesAsync();
var workflowDefinition = _publisher.New();
var root = _serializer.Deserialize(workflowDefinition.StringData);
Assert.NotNull(root);
}
}