Merge remote-tracking branch 'origin/feat/tests-http-endpoint' into feat/tests-http-endpoint

This commit is contained in:
lucas.hipolito 2025-12-03 15:30:20 +01:00
commit 2f93f498b4

View file

@ -61,11 +61,15 @@ public class HttpEndpointTests(App app) : AppComponentTest(app)
{
// Arrange
var client = WorkflowServer.CreateHttpWorkflowClient();
var request = new HttpRequestMessage(HttpMethod.Patch, "test/multi-method");
// Act
var response = await client.SendAsync(request);
using (var request = new HttpRequestMessage(HttpMethod.Patch, "test/multi-method"))
{
// Act
var response = await client.SendAsync(request);
// Assert
// In this test environment, unsupported methods on unregistered endpoints return NotFound
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
}
// Assert
// In this test environment, unsupported methods on unregistered endpoints return NotFound
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);