elsa-core/test/unit/Elsa.Http.UnitTests/ContentWriters/RawStringContentTests.cs
Sipke Schoorstra 59bfcf0ba5
Add distributed workflow runtime implementation.
Introduced `DistributedWorkflowRuntime` to support distributed workflow execution with locking mechanisms. Added new module `Elsa.Workflows.Runtime.Distributed` with key services, features, and client implementations for handling distributed bookmarks and workflow clients. Updated integration and component tests to use the new distributed runtime where relevant.
2025-06-03 09:58:20 +02:00

30 lines
874 B
C#

using System.Net.Http.Headers;
using System.Text;
using Elsa.Http.ContentWriters;
using Xunit;
namespace Elsa.Http.UnitTests.ContentWriters;
/// <summary>
/// Tests for the <see cref="RawStringContent"/> class.
/// </summary>
public class RawStringContentTests
{
/// <summary>
/// Tests that the content type is set exactly as provided without appending charset information.
/// </summary>
[Fact]
public void ContentType_ShouldNotAppendCharset()
{
// Arrange
const string contentType = "text/xml";
const string content = "<root>test</root>";
// Act
var rawContent = new RawStringContent(content, Encoding.UTF8, contentType);
// Assert
Assert.Equal(contentType, rawContent.Headers.ContentType?.MediaType);
Assert.Null(rawContent.Headers.ContentType?.CharSet);
}
}