Skip to content

Increase use of POITestCase assert methods and assertInstanceOf in tests#1083

Merged
pjfanning merged 1 commit into
apache:trunkfrom
pjfanning:copilot/improve-poitestcase-asserts
May 25, 2026
Merged

Increase use of POITestCase assert methods and assertInstanceOf in tests#1083
pjfanning merged 1 commit into
apache:trunkfrom
pjfanning:copilot/improve-poitestcase-asserts

Conversation

@pjfanning
Copy link
Copy Markdown
Member

  • Replace assertTrue(x instanceof Y) → assertInstanceOf(Y.class, x) (JUnit 5)
  • Replace assertTrue(str.startsWith("lit")) → assertStartsWith(str, "lit") (POITestCase)
  • Replace assertTrue(str.endsWith("lit")) → assertEndsWith(str, "lit") (POITestCase)
  • Replace assertTrue(str.contains("lit")) → assertContains(str, "lit") (POITestCase)
  • Replace assertFalse(str.contains("lit")) → assertNotContains(str, "lit") (POITestCase)
  • Add missing assertInstanceOf/assertStartsWith/assertEndsWith/assertContains/assertNotContains imports
  • Remove assertTrue/assertFalse imports from files where they are no longer used
  • Sort all static and regular imports alphabetically (case-sensitive/ASCII order) in changed files

…s test suite

- Replace assertTrue(x instanceof Y) → assertInstanceOf(Y.class, x) (JUnit 5)
- Replace assertTrue(str.startsWith("lit")) → assertStartsWith(str, "lit") (POITestCase)
- Replace assertTrue(str.endsWith("lit")) → assertEndsWith(str, "lit") (POITestCase)
- Replace assertTrue(str.contains("lit")) → assertContains(str, "lit") (POITestCase)
- Replace assertFalse(str.contains("lit")) → assertNotContains(str, "lit") (POITestCase)
- Add missing assertInstanceOf/assertStartsWith/assertEndsWith/assertContains/assertNotContains imports
- Remove assertTrue/assertFalse imports from files where they are no longer used
- Sort all static and regular imports alphabetically (case-sensitive/ASCII order) in changed files

Agent-Logs-Url: https://github.com/pjfanning/poi/sessions/cdf60b8b-5a7b-47e7-8c54-4149d5fb6a02

Co-authored-by: pjfanning <11783444+pjfanning@users.noreply.github.com>
@pjfanning pjfanning merged commit 737e3e5 into apache:trunk May 25, 2026
1 check passed
@pjfanning pjfanning deleted the copilot/improve-poitestcase-asserts branch May 25, 2026 20:24
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