Skip to content

Commit

Permalink
Improved test assert failure messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jrippington committed Feb 7, 2024
1 parent 9ac5a97 commit 2251829
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task<RestResponse> PostPriceChangeResponseAsyncForJSON(string fileP

List<string> uniqueProductFromAzureStorage = AzureBlobStorageHelper.GetProductListFromBlobContainerAsync(responseHeaderCorrelationId).Result;

Assert.That(uniqueProductFromInputPayload.Count.Equals(uniqueProductFromAzureStorage.Count), Is.True, "Slicing is not correct");
Assert.That(uniqueProductFromInputPayload.Count.Equals(uniqueProductFromAzureStorage.Count), Is.True, $"Slicing is not correct: uniqueProductFromInputPayload has count {uniqueProductFromInputPayload.Count}, uniqueProductFromAzureStorage has count {uniqueProductFromAzureStorage.Count}");

foreach (string products in uniqueProductFromAzureStorage)
{
Expand Down Expand Up @@ -198,7 +198,7 @@ public async Task<bool> PostPriceChangeResponse200OKPAYSF12Months(string filePat
responseHeadercorrelationID = GetResponseHeaderCorrelationId(response);
_uniquePdtFromInputPayload = GetProductListFromInputPayload(filePath);
List<string> UniquePdtFromAzureStorage = _azureBlobStorageHelper.GetProductListFromBlobContainerAsync(responseHeadercorrelationID).Result;
Assert.That(_uniquePdtFromInputPayload.Count.Equals(UniquePdtFromAzureStorage.Count), Is.True, "Slicing is not correct");
Assert.That(_uniquePdtFromInputPayload.Count.Equals(UniquePdtFromAzureStorage.Count), Is.True, $"Slicing is not correct: _uniquePdtFromInputPayload has count {_uniquePdtFromInputPayload.Count}, UniquePdtFromAzureStorage has count {UniquePdtFromAzureStorage.Count}");
foreach (string products in UniquePdtFromAzureStorage)
{
string generatedProductJsonFile = AzureBlobStorageHelper.DownloadJsonFromAzureBlob(generatedProductJsonFolder, responseHeadercorrelationID, products, "ProductChange");
Expand Down

0 comments on commit 2251829

Please sign in to comment.