Conversation
There was a problem hiding this comment.
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.
| /** | ||
| * 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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Should be called after the class that it tests
| public class InvoiceScenarioXmlTest { | ||
|
|
||
| @ParameterizedTest(name = "{0} / {1}") | ||
| @MethodSource("de.codebarista.gallop.TestHelper#invoiceProfilesAndScenarios") |
There was a problem hiding this comment.
If InvoiceProfileTest is removed, I would inline that and the other things that have been extracted into the TestHelper class.
Co-authored-by: Claus Steuer <claus755@gmail.com>
No description provided.