Skip to content

Conversation

@mdzyuba
Copy link
Contributor

@mdzyuba mdzyuba commented Jan 14, 2026

Added tests. Refactored tests results to be in the same folder as requested.

This PR depends on the previous PR that adds formatting plugin - #4. It shares the same first commit.

These updated do not change any functionality. The intention is to create a safety net before submitting more updates.

Please let me know if any changes are required before submitting the other PRs.

Thank you.

@ByteHamster
Copy link
Owner

Thanks! Would you mind rebasing please, now that the other PRs are merged?

@mdzyuba mdzyuba force-pushed the add_unit_and_integration_tests branch from df1be52 to 0bf2c6c Compare January 14, 2026 19:43
@mdzyuba
Copy link
Contributor Author

mdzyuba commented Jan 14, 2026

Sure. Rebased.

@mdzyuba mdzyuba mentioned this pull request Jan 14, 2026
@ByteHamster
Copy link
Owner

  • What is the difference between the unit tests and the integration tests here? To me, they both seem to do pretty much the same thing (format an entire document and look at the result). Do we actually need two different kinds of tests? To me, it feels like all unit tests are already covered by the integration tests, and the unit tests are not more "lightweight" than the integration tests. So what is their advantage compared to the integration tests?
  • The pom file adds jacoco, but is that actually used anywhere?
  • (that's a different thing, but could you enable spotless:check on CI please?)

@mdzyuba mdzyuba force-pushed the add_unit_and_integration_tests branch from 0bf2c6c to 674bd19 Compare January 15, 2026 03:24
@mdzyuba
Copy link
Contributor Author

mdzyuba commented Jan 15, 2026

Removed unit tests and jacoco.

@mdzyuba
Copy link
Contributor Author

mdzyuba commented Jan 15, 2026

Enabled spotless:check in PR#8.

@mdzyuba mdzyuba force-pushed the add_unit_and_integration_tests branch from 674bd19 to 50e4847 Compare January 15, 2026 22:15
Integration tests that verify XML formatting by comparing input files
against expected output files for each tool option:

Test cases:
- Default options (id, layout_width, layout_height first)
- Custom indentation (--indention)
- Custom attribute indentation (--attribute-indention)
- Custom attribute order (--attribute-order)
- Alphabetical attribute sort (--attribute-sort)
- Custom namespace order (--namespace-order)
- Alphabetical namespace sort (--namespace-sort)
- Combined options (multiple flags together)
- Zero indentation
- Valid XML output verification
- Nested element structure verification
@mdzyuba mdzyuba force-pushed the add_unit_and_integration_tests branch from 50e4847 to f51d34c Compare January 15, 2026 22:18
@mdzyuba
Copy link
Contributor Author

mdzyuba commented Jan 15, 2026

Rebased

@ByteHamster ByteHamster merged commit b44cb58 into ByteHamster:main Jan 16, 2026
1 check passed
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