Skip to content
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

Fix #4236 : Add tests for AsyncResultSubject #5670

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

TanishMoral11
Copy link
Collaborator

Explanation

This PR adds tests for the AsyncResultSubject class. It verifies that the AsyncResultSubject handles non-iterable results correctly and ensures that the expected failures occur when the result is not iterable. The test specifically checks that the appropriate behavior is triggered when a non-iterable result is provided.

  • Fixes part of #4236: Adds tests to ensure correct handling of non-iterable async results.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

@TanishMoral11
Copy link
Collaborator Author

Hey @adhiamboperes PTAL, and suggest me if there are any changes to make.

Image

@TanishMoral11 TanishMoral11 marked this pull request as ready for review January 27, 2025 10:48
@TanishMoral11 TanishMoral11 requested review from a team as code owners January 27, 2025 10:48
@TanishMoral11
Copy link
Collaborator Author

Hey @adhiamboperes, PTAL !!

Copy link

Coverage Report

Results

Number of files assessed: 3
Overall Coverage: 89.81%
Coverage Analysis: PASS

Passing coverage

Files with passing code coverage
File Coverage Lines Hit Status Min Required
MathTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/MathTagHandler.kt
89.81% 97 / 108 70%

Exempted coverage

Files exempted from coverage
File Exemption Reason
StateRetriever.ktdomain/src/main/java/org/oppia/android/domain/util/StateRetriever.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AsyncResultSubject.kttesting/src/main/java/org/oppia/android/testing/data/AsyncResultSubject.kt
This file is exempted from having a test file; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

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.

2 participants