From 15c7fe7966e49ddb2723b2b51be9bbdb093af544 Mon Sep 17 00:00:00 2001 From: Craig Edmunds Date: Tue, 17 Dec 2024 22:20:57 +0000 Subject: [PATCH] Handles checks in clearance request builder --- TestDataGenerator/ClearanceRequestBuilder.cs | 3 ++- TestDataGenerator/Scenarios/Samples/cr-one-item.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TestDataGenerator/ClearanceRequestBuilder.cs b/TestDataGenerator/ClearanceRequestBuilder.cs index 5e44ffa..2b3ec6f 100644 --- a/TestDataGenerator/ClearanceRequestBuilder.cs +++ b/TestDataGenerator/ClearanceRequestBuilder.cs @@ -68,7 +68,7 @@ public ClearanceRequestBuilder WithArrivalDateTimeOffset(DateOnly? date, Time } public ClearanceRequestBuilder WithItem(string documentCode, string commodityCode, string description, - int netWeight) + int netWeight, string checkCode = "H2019") { return Do(cr => { @@ -76,6 +76,7 @@ public ClearanceRequestBuilder WithItem(string documentCode, string commodity cr.Items![0].GoodsDescription = description; cr.Items![0].ItemNetMass = netWeight; cr.Items![0].Documents![0].DocumentCode = documentCode; + cr.Items![0].Checks![0].CheckCode = checkCode; }); } diff --git a/TestDataGenerator/Scenarios/Samples/cr-one-item.json b/TestDataGenerator/Scenarios/Samples/cr-one-item.json index a6228d2..e4eeabf 100644 --- a/TestDataGenerator/Scenarios/Samples/cr-one-item.json +++ b/TestDataGenerator/Scenarios/Samples/cr-one-item.json @@ -41,7 +41,7 @@ "documentQuantity": 3 } ], - "check": [ + "checks": [ { "checkCode": "H2019", "departmentCode": "GB"