- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 2
Refactor AdUtils tests to use fake ad views #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor AdUtils tests to use fake ad views #227
Conversation
 
 @chatgpt-codex-connector
 
 chatgpt-codex-connector
 bot
 
 
 left a comment
 
 
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Avoid instantiating Android views in plain unit tests
The new FakeAdView/FakeNativeAdBannerView subclasses call the real AdView and NativeAdBannerView constructors. Those classes depend on Android UI and Google Play Services state (e.g., LayoutTransition, thread loopers) and cannot be instantiated in app/src/test JVM tests without Robolectric or instrumentation. The previous Mockito approach avoided touching framework code, but now the test suite will throw RuntimeException("Stub!") or similar before it can verify behavior. Consider keeping mocks or moving these tests to an Android-aware test environment.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68c97643fcb8832dacae90ef95f718dd