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

chore: add unit tests for MediaType class #117

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

Mohammad-Dwairi
Copy link
Contributor

Situation

With the introduction of the new SDK core, we need to raise the tests coverage before attempting to migrate the core module to the original repository. We will be testing the new core with this LC SDK during this temporary phase.

Task

  1. Cover MediaType HTTP model class with unit tests

Action

  1. Refactored the original MediaType class for better clarity.
  2. Added CommonMediaTypes utility class that holds common media types used usually as Content-Type header value.
  3. Updated LoggableMediaTypes to use the refactored MediaType instances.
  4. Added MediaTypeTest with Kotlin tests.
  5. Added MediaTypeJavaTest with Java tests, mainly to ensure Java accessibility and usability.
  6. Added CommonMediaTypesTest Kotlin tests.

Testing

All tests are passing

Results

MediaType & CommonMediaTypes are 100% covered

Screenshot 2024-12-04 at 14 02 51

@Mohammad-Dwairi Mohammad-Dwairi requested a review from a team as a code owner December 4, 2024 14:58
@Mohammad-Dwairi Mohammad-Dwairi merged commit 86be51c into main Dec 5, 2024
1 check passed
@Mohammad-Dwairi Mohammad-Dwairi deleted the mdwairi/add-mediatype-tests branch December 5, 2024 13:29
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.

3 participants