Skip to content

refactor: make MockHttpClientCall internal - #126

Open
MaxMichel2 wants to merge 1 commit into
feat/networkmock-sequential-mocksfrom
refactor/mock-http-client-call-internal
Open

MaxMichel2 wants to merge 1 commit into
feat/networkmock-sequential-mocksfrom
refactor/mock-http-client-call-internal

Conversation

@MaxMichel2

Copy link
Copy Markdown
Collaborator

Summary

Closes #89.

MockHttpClientCall was public purely because Ktor's HttpClientCall(client) base constructor requires it to be instantiable from the plugin's install code — nothing about it is meant to be integrator-facing. Its rawContent override is already annotated @InternalAPI, meaning it depends on an unstable Ktor API; staying public compounded that instability onto this library's own tracked API surface.

What changed

  • MockHttpClientCall → internal. Its only caller, createMockHttpClientCall, is already private in the same file, so this is a clean visibility narrowing with no call-site changes needed elsewhere.
  • devview-networkmock-ktor/api/api.txt regenerated via metalavaGenerateSignature — MockHttpClientCall no longer listed.
  • Dropped the now-stale "public because of Ktor internals" bullet from devview-networkmock-ktor/CLAUDE.md.

Verified no test or sample code constructs MockHttpClientCall directly.

Verification

.\gradlew.bat detektFull -Pandroidx.baselineprofile.skipgeneration
.\gradlew.bat cleanTestAndroidHostTest testAndroidHostTest -Pandroidx.baselineprofile.skipgeneration
.\gradlew.bat :konsist:test -Pandroidx.baselineprofile.skipgeneration
.\gradlew.bat :sample:androidApp:assembleDebug -Pandroidx.baselineprofile.skipgeneration

All green.

🤖 Generated with Claude Code

@MaxMichel2
MaxMichel2 force-pushed the refactor/mock-http-client-call-internal branch from 44b468d to f86a085 Compare September 22, 2026 11:16
@MaxMichel2
MaxMichel2 changed the base branch from main to feat/networkmock-sequential-mocks September 22, 2026 11:16
@MaxMichel2 MaxMichel2 added this to the 0.2.0 milestone Sep 22, 2026
@MaxMichel2 MaxMichel2 self-assigned this Sep 22, 2026
@MaxMichel2
MaxMichel2 added this pull request to stack #130 September 22, 2026 12:07
MockHttpClientCall was public purely because Ktor's HttpClientCall(client)
base constructor requires it to be instantiable from the plugin's install
code - nothing about it is meant to be integrator-facing, and its
rawContent override already depends on the @InternalAPI-annotated Ktor
API, so staying public compounded that instability risk onto this
library's own public API surface.

createMockHttpClientCall (the only caller) is already private in the
same file, so this is a clean visibility narrowing with no call-site
changes needed elsewhere. api.txt regenerated; no test or sample code
constructed MockHttpClientCall directly.

Closes #89.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

refactor: make MockHttpClientCall internal

1 participant