Skip to content

Add unit tests for RequestBuilder listeners, Display EDT exception, BrowserWindow fallback, and Purchase sync#4503

Merged
shai-almog merged 2 commits intomasterfrom
codex/add-unit-tests-for-zero-coverage-classes
Feb 8, 2026
Merged

Add unit tests for RequestBuilder listeners, Display EDT exception, BrowserWindow fallback, and Purchase sync#4503
shai-almog merged 2 commits intomasterfrom
codex/add-unit-tests-for-zero-coverage-classes

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Increase unit-test coverage for several internal listener/helper classes used by the REST stack, UI EDT exception handling and BrowserWindow fallback, and the Purchase receipts synchronization path.
  • Exercise real API flows (no reflection) so the asynchronous listeners and runnable synchronization paths are exercised via the test harness.

Description

  • Added RequestBuilderActionListenerTest which exercises async/sync JSON map callbacks, properties→business object parsing (fetchAsProperties / fetchAsPropertyList), and the legacy async Callback paths for bytes and strings to hit GetAsBytesAsyncImplActionListener and GetAsStringAsyncImplActionListener.
  • Added SampleItem test business object used by the properties tests (implements PropertyBusinessObject).
  • Extended DisplayTest with testEdtExceptionCapturedByCrashReporter to enable async stack traces and verify Display$EdtException propagation to a CrashReport.
  • Extended BrowserWindowTest with fallbackWindowUsesBrowserForm to exercise the BrowserWindow.BrowserForm fallback code path when native windows are not available.
  • Extended PurchaseTest with testSynchronizeReceiptsSyncWaitsForAsyncFetch to exercise the SynchronizeReceiptsSyncRunnable / async receipt fetch path used by synchronizeReceiptsSync.
  • Note: CSSBorder.LinearGradient could not be reached via public APIs without reflection, so no direct test was added for it.

Testing

  • No CI or Maven tests were executed as part of this change in this PR; the tests were added to maven/core-unittests.
  • To run the module tests locally use the project-recommended command: cd maven && mvn -pl core-unittests -am -DunitTests=true -Dmaven.javadoc.skip=true -Plocal-dev-javase test.
  • To run the full CI-like verification use: cd maven && mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true -Plocal-dev-javase.
  • If you want a quick smoke loop while iterating use the helper script: ./scripts/fast-core-unit-smoke.sh.

Codex Task

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog shai-almog merged commit f3c4a89 into master Feb 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant