Aanbiedingen: planning en aan/uit per pakket, admin-lijst /offerings/all, Annuleren op het pakketformulier

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 11:42:26 +01:00
co-authored by Claude Sonnet 5.5
parent 321234dfa6
commit 8af156c238
29 changed files with 916 additions and 73 deletions
@@ -27,6 +27,10 @@ public class OfferingsControllerTests
private static OfferingDto Dto(int displayOrder = 0) => new(
Guid.NewGuid().ToString(), "title", "Title", "Description", "€ 100", "per month", ["Feature 1"], "Contact", false, displayOrder);
private static OfferingAdminDto AdminDto(int displayOrder = 0) => new(
Guid.NewGuid().ToString(), "title", "Title", "Description", "€ 100", "per month", ["Feature 1"], "Contact", false, displayOrder,
null, null, true, null, null);
private static CreateOfferingRequest CreateRequest() => new(
"Title", "Description", "€ 100", "per month", ["Feature 1"], "Contact");
@@ -50,7 +54,7 @@ public class OfferingsControllerTests
[Fact]
public async Task Create_Returns201Created()
{
_service.CreateAsync(Arg.Any<CreateOfferingRequest>(), Arg.Any<Guid>()).Returns(Dto());
_service.CreateAsync(Arg.Any<CreateOfferingRequest>(), Arg.Any<Guid>()).Returns(AdminDto());
var result = await CreateSut().Create(CreateRequest());
@@ -73,7 +77,7 @@ public class OfferingsControllerTests
[Fact]
public async Task Update_Returns200_WhenFound()
{
_service.UpdateAsync(Arg.Any<Guid>(), Arg.Any<UpdateOfferingRequest>(), Arg.Any<Guid>()).Returns(Dto());
_service.UpdateAsync(Arg.Any<Guid>(), Arg.Any<UpdateOfferingRequest>(), Arg.Any<Guid>()).Returns(AdminDto());
var result = await CreateSut().Update(Guid.NewGuid(), UpdateRequest());
@@ -84,7 +88,7 @@ public class OfferingsControllerTests
public async Task Update_Returns404_WhenNotFound()
{
_service.UpdateAsync(Arg.Any<Guid>(), Arg.Any<UpdateOfferingRequest>(), Arg.Any<Guid>())
.Returns((OfferingDto?)null);
.Returns((OfferingAdminDto?)null);
var result = await CreateSut().Update(Guid.NewGuid(), UpdateRequest());