Merge remote-tracking branch 'origin/feat/tests-http-endpoint' into feat/tests-http-endpoint
This commit is contained in:
commit
7091d07dc3
|
|
@ -61,7 +61,6 @@ The `Workflows/` directory contains test workflow implementations:
|
|||
- `JsonContentWorkflow.cs` - JSON content parsing
|
||||
- `FormDataWorkflow.cs` - Form data handling
|
||||
- `FileUploadWorkflow.cs` - File upload processing
|
||||
- `FileValidationWorkflow.cs` - File validation constraints with size, extension, and MIME type validation
|
||||
- `SecurityTestWorkflows.cs` - Security-focused workflows including authentication and blocked extensions
|
||||
|
||||
## Key Features Tested
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public class FileUploadWorkflow : WorkflowBase
|
|||
Content = new(context =>
|
||||
{
|
||||
var files = filesVariable.Get(context);
|
||||
var firstFile = fileVariable.Get(context);
|
||||
|
||||
if (files?.Length > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,8 +33,16 @@ public class FormDataWorkflow : WorkflowBase
|
|||
var content = parsedContentVariable.Get(context);
|
||||
if (content is IDictionary<string, object> formData)
|
||||
{
|
||||
var name = formData.ContainsKey("name") ? formData["name"]?.ToString() : "unknown";
|
||||
var email = formData.ContainsKey("email") ? formData["email"]?.ToString() : "unknown";
|
||||
string name;
|
||||
if (formData.TryGetValue("name", out var nameObj) && nameObj != null)
|
||||
name = nameObj.ToString();
|
||||
else
|
||||
name = "unknown";
|
||||
string email;
|
||||
if (formData.TryGetValue("email", out var emailObj) && emailObj != null)
|
||||
email = emailObj.ToString();
|
||||
else
|
||||
email = "unknown";
|
||||
return $"Name: {name}, Email: {email}";
|
||||
}
|
||||
return "No form data received";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class RouteParametersWorkflow : WorkflowBase
|
|||
},
|
||||
new WriteHttpResponse
|
||||
{
|
||||
Content = new(context =>
|
||||
Content = new(context =>
|
||||
{
|
||||
var routeData = routeDataVariable.Get(context);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue