Skip to content

Conversation

MihaiCristianCondrea
Copy link
Owner

Summary

  • add StartupViewModel unit tests verifying consent info requests and form loading delegate to use cases

Testing

  • ./gradlew test (fails: SDK location not found)

https://chatgpt.com/codex/tasks/task_e_68c67a733bd4832db5c343cdd2da30e5

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +32 to +36
OnFormError onError = mock(OnFormError.class);

viewModel.requestConsentInfoUpdate(activity, params, onSuccess, onError);

verify(requestUseCase).invoke(activity, params, onSuccess, onError);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Fix OnFormError type mismatch in StartupViewModel tests

The new tests pass com.d4rk.androidtutorials.java.data.repository.StartupRepository.OnFormError into StartupViewModel.requestConsentInfoUpdate, but the ViewModel’s method is typed to com.d4rk.androidtutorials.java.ui.screens.startup.repository.StartupRepository.OnFormError (a type that doesn’t exist). This causes the test suite to fail to compile before it can exercise the delegation logic. Align the test with the ViewModel’s API or, preferably, adjust the ViewModel to depend on the data-layer interface so both production and test code compile.

Useful? React with 👍 / 👎.

@MihaiCristianCondrea MihaiCristianCondrea merged commit 1bfd24b into main Sep 14, 2025
1 check 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