Add unit tests for CsvTableFormatter FINAL - #128
Conversation
This test class includes various unit tests for the CsvTableFormatter.
- Updated tests to use new CsvTableFormatter API - Tests now use formatTable(List<Row> rows, int limit) signature - Tests use default constructor or custom newline constructor - All 19 tests pass successfully
|
|
Right now the tests included in the PR don’t quite match the current project API (constructor signatures, method parameters, header handling, etc.), so they’re failing during CI. Because we’re so close to the submission deadline, it’s a bit risky to debug a full test suite from scratch. To keep things simple and still get decent coverage, I’d suggest starting with a very small set of focused tests. These exercise the main behaviour of the formatter without relying on unsupported signatures or assumptions. Try these. I think they will run ok and get us started./** ========================= |
|
Ammended the testing a bit as per @MichaelMcKibbin suggestions above. |
- Replace 18 tests with 3 focused tests covering core functionality - Add readAll() helper method for cleaner row reading - Use VirtualReader for in-memory CSV testing - Tests: table formatting with headers, empty list handling, multiline cells - All tests pass successfully
|
Fixed
Updated constructors to use All tests now pass locally and in CI. |
This test class includes various unit tests for the CsvTableFormatter.