Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

fix: empty and whitespace elements for required elements when parsing cim document is now handled #1855

Merged
merged 27 commits into from
Nov 17, 2022

Conversation

x-platformcoder
Copy link
Contributor

@x-platformcoder x-platformcoder commented Nov 7, 2022

Description

When CIM messages are parsed and required elements are either empty, only contain whitespace, or have a value that Charges do not support, and the possibility to handle those cases with asynchronous errors is not possible a bad request = "400" is returned with an error code "B2B-005" and an error message describing the problem as an XML message

References

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Merging #1855 (6c77aa7) into main (667aeb3) will decrease coverage by 0.25%.
The diff coverage is 76.13%.

@@            Coverage Diff             @@
##             main    #1855      +/-   ##
==========================================
- Coverage   84.39%   84.14%   -0.26%     
==========================================
  Files         469      450      -19     
  Lines        8072     7888     -184     
  Branches      433       22     -411     
==========================================
- Hits         6812     6637     -175     
+ Misses       1174     1123      -51     
- Partials       86      128      +42     
Flag Coverage Δ
business 87.64% <76.13%> (?)
clientlibraries 32.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s.FunctionHost/ChargeLinks/ChargeLinksIngestion.cs 0.00% <0.00%> (ø)
...ub.Charges.FunctionHost/Charges/ChargeIngestion.cs 0.00% <0.00%> (ø)
...ization/MarketDocument/InvalidXmlValueException.cs 84.61% <84.61%> (ø)
...on/ChargeInformationCommandReceivedEventHandler.cs 100.00% <100.00%> (ø)
...ost/Charges/Handlers/ChargeCommandBundleHandler.cs 100.00% <100.00%> (ø)
...Host/Configuration/ChargeIngestionConfiguration.cs 100.00% <100.00%> (ø)
...astructure.Core/Function/B2BErrorMessageFactory.cs 100.00% <100.00%> (ø)
...nfrastructure.Core/Function/HttpResponseBuilder.cs 94.73% <100.00%> (-0.51%) ⬇️
...ation/ChargeBundle/ChargeCommandBundleConverter.cs 98.66% <100.00%> (+0.97%) ⬆️
...eserialization/MarketDocument/DocumentConverter.cs 98.78% <100.00%> (+0.39%) ⬆️
... and 81 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 7, 2022 14:57 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 7, 2022 14:57 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 7, 2022 14:57 Inactive
@x-platformcoder x-platformcoder changed the title fix: empty and whitespace elements for required elements when parsing cim document is now handled (wip) fix: empty and whitespace elements for required elements when parsing cim document is now handled Nov 8, 2022
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 8, 2022 14:47 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 8, 2022 14:47 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 8, 2022 14:47 Inactive
@x-platformcoder x-platformcoder changed the title (wip) fix: empty and whitespace elements for required elements when parsing cim document is now handled fix: empty and whitespace elements for required elements when parsing cim document is now handled Nov 8, 2022
@x-platformcoder x-platformcoder changed the title fix: empty and whitespace elements for required elements when parsing cim document is now handled (wip) fix: empty and whitespace elements for required elements when parsing cim document is now handled Nov 9, 2022
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 9, 2022 06:03 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 9, 2022 06:03 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 9, 2022 06:03 Inactive
@x-platformcoder x-platformcoder changed the title (wip) fix: empty and whitespace elements for required elements when parsing cim document is now handled fix: empty and whitespace elements for required elements when parsing cim document is now handled Nov 9, 2022
…nctionHost/Charges/Handlers/IChargeCommandBundleHandler.cs

Co-authored-by: Henrik Sommer <[email protected]>
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 16, 2022 14:52 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 16, 2022 14:52 Inactive
@HenrikSommer HenrikSommer temporarily deployed to AzureAuth November 16, 2022 15:54 Inactive
@HenrikSommer HenrikSommer temporarily deployed to AzureAuth November 16, 2022 15:54 Inactive
@HenrikSommer HenrikSommer temporarily deployed to AzureAuth November 16, 2022 15:54 Inactive
…nto problem_with_whitespace_empty

# Conflicts:
#	source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.Tests/Infrastructure/CimDeserialization/InvalidXmlValueExceptionTests.cs
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 17, 2022 07:39 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 17, 2022 07:39 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 17, 2022 07:39 Inactive
@x-platformcoder x-platformcoder temporarily deployed to AzureAuth November 17, 2022 07:39 Inactive
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@x-platformcoder x-platformcoder merged commit 0a64bd3 into main Nov 17, 2022
@x-platformcoder x-platformcoder deleted the problem_with_whitespace_empty branch November 17, 2022 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants