[Auto] Add unit tests for craftd-core#98
Merged
Merged
Conversation
Contributor
- Add JUnit4, MockK and kotlin("test-junit") to androidUnitTest dependencies
- Fix CraftDViewListenerTest: remove markdown code fence wrappers (AI generator bug)
- Fix CraftDSimplePropertiesDiffCallbackTest: replace invalid throws() syntax with
proper MockK every/throws pattern; remove dead AbstractMap objects with
incompatible entries type overrides
- Fix ActionPropertiesTest: remove unused DiffUtil import
- Fix ButtonPropertiesTest: replace non-existent CraftDAlign.START/END with LEFT/RIGHT
- Fix TextPropertiesTest: replace non-existent CraftDTextStyle.REGULAR with NORMAL
- Fix StylePropertiesTest: add explicit type parameter to assertNotEquals for mixed types
- Fix CheckBoxPropertiesTest: remove annotation reflection tests for @Stable/@immutable
and @serializable (binary retention, not visible at runtime)
- Fix SimplePropertiesTest: replace assertNotEquals with assertTrue(a !== b) for
reference inequality checks
- Fix ContextExtesionTest: replace mockInputStream chain with ByteArrayInputStream
(InputStream.bufferedReader() is an extension function, not mockable without mockkStatic)
- Fix ViewMapperVoTest: remove tests that assumed Jackson convertValue handles JSON
strings and generic List conversion (unsupported by the implementation)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
77e8c26 to
a931cfa
Compare
Documents recurring compile and runtime errors from CI-generated tests: markdown code fences, invalid MockK usage, non-existent enum values, annotation retention limits, extension function mocking, and Jackson convertValue limitations. Serves as a reference to fix similar PRs faster. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gabrielbmoro
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Auto-generated Unit Tests
Este PR foi gerado automaticamente pelo workflow Auto Generate Cover+Test usando a Claude API.
Evolução de cobertura
Arquivos cobertos
Como funciona
android_kmp/craftd-coreChecklist de revisão
./gradlew testDebugUnitTest)