Skip to content

E invoice profiles - #8

Open
embewee wants to merge 11 commits into
masterfrom
e-invoice-profiles
Open

embewee wants to merge 11 commits into
masterfrom
e-invoice-profiles

Conversation

@embewee

@embewee embewee commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@embewee
embewee requested a review from csteuer August 17, 2026 14:55
Comment thread src/main/java/de/codebarista/gallop/xrechnung/InvoiceProfile.java

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can get rid of this file.

Testing whether a constant has a certain value or if a deprecated method uses a specific parameter value for the method it has been replaced with is not worth it, in my opinion.
It's unlikely that the constants are changed accidentally. If they are changed, the change is on purpose.
Same for the deprecated functions.

The other tests do not cover anything that is not already covered by the golden file tests.

Comment on lines 33 to 45
/**
* Writes a XRechnung XML with the data of an {@linkplain Invoice} object
* <p>
* The mapping from the XRechnung specification ID (like BT-82) to the corresponding XML element can be found
* in the <code>XRechnung-v3.0.2-Syntax-Binding-Extension-UBL.pdf</code> or in the XRechnung bundle at:
* <code>xrechnung-3.0.2-xrechnung-visualization-2024-06-20/xsl/cii-xr.xsl</code>
* <p>
* The writer will always produce valid XML, but it does not guarantee that the generated XRechnung is valid
* according to the schema and the business rules.
* E.g. if required data is missing the writer will create an empty element or omit the corresponding xml structure completely.
* The XRechnung will only be valid if the data in the invoice object is correct.
*/
public class XRechnungWriter {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that it's also possible to write Factur-X and ZUGFeRD XMLs this class name and the description must be changed. E.g. EInvoiceXMLWriter or EInvoiceCIIXMLWriter

*
* <p>Scenarios and profiles are registered once in {@link TestHelper}.</p>
*/
public class InvoiceScenarioXmlTest {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be called after the class that it tests

public class InvoiceScenarioXmlTest {

@ParameterizedTest(name = "{0} / {1}")
@MethodSource("de.codebarista.gallop.TestHelper#invoiceProfilesAndScenarios")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If InvoiceProfileTest is removed, I would inline that and the other things that have been extracted into the TestHelper class.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants