Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public sealed class CensusActionsResponse
public required string Overview { get; init; }
public required ActionStatus Status { get; init; }
public required LastUpdated LastUpdated { get; init; }
public required SupportService SupportService { get; init; }
public required CallToAction CallToAction { get; init; }
public IReadOnlyList<ActionStep> Steps { get; init; } = [];
public IReadOnlyList<ImportantDate> ImportantDates { get; init; } = [];
Expand Down Expand Up @@ -48,3 +49,10 @@ public sealed class ImportantDate
public DateOnly Date { get; init; }
public required string Label { get; init; }
}

public sealed class SupportService
{
public required string Title { get; init; }
public required string Description { get; init; }
public required Uri Url { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ public static CensusActionsResponse Create(int? statusCode = null)
Label = ReturnStatusMapper.GetStatusDescription(statusCode.Value),
},
LastUpdated = new LastUpdated { Date = new DateOnly(2026, 8, 26) },
SupportService = new SupportService
{
Title = "Get help with the Autumn school census",
Description = "Contact the Autumn school census team (opens in new tab)",
Url = new Uri(
"https://form.education.gov.uk/en/AchieveForms/?form_uri=sandbox-publish://AF-Process-2b61dfcd-9296-4f6a-8a26-4671265cae67/AF-Stage-f3f5200e-e605-4a1b-ae6b-3536bc77305c/definition.json&redirectlink=%2Fen&cancelRedirectLink=%2Fen"
),
},
CallToAction = new CallToAction
{
Label = "Go to COLLECT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public async Task CensusActions_endpoint_should_return_census_actions_response()
result.Status.Name.ShouldBe(stubbedCensusResponse.Status.Name);
result.Status.Label.ShouldBe(stubbedCensusResponse.Status.Label);
result.LastUpdated.Date.ShouldBe(stubbedCensusResponse.LastUpdated.Date);
result.SupportService.Title.ShouldBe(stubbedCensusResponse.SupportService.Title);
result.SupportService.Description.ShouldBe(
stubbedCensusResponse.SupportService.Description
);
result.SupportService.Url.ShouldBe(stubbedCensusResponse.SupportService.Url);
result.CallToAction.Label.ShouldBe(stubbedCensusResponse.CallToAction.Label);
result.CallToAction.Url.ShouldBe(stubbedCensusResponse.CallToAction.Url);
result.Steps.Count.ShouldBe(stubbedCensusResponse.Steps.Count);
Expand Down
Loading