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 Headers class #115

Merged
merged 70 commits into from
Dec 4, 2024

Conversation

Mohammad-Dwairi
Copy link
Contributor

@Mohammad-Dwairi Mohammad-Dwairi commented Dec 3, 2024

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. Configure Junit and Kover.
  2. Cover Headers HTTP model class with unit tests.

Action

  1. Added Junit as test dependency.
  2. Added Kover plugin for tests reporting.
  3. Added HeadersTest class containing tests for Headers class and its internal builder logic.
  4. Added HeadersJavaTest to cover code generated by annotations like @JvmStatic. The reporting tool fails to detect correct coverage without testing these in Java. Anyway, this could be useful to always be sure of the code accessibility in Java environments.

Testing

All new tests are passing.

Results

Headers class is 100% covered.

Screenshot 2024-12-04 at 02 46 04

OmarAlJarrah and others added 30 commits October 30, 2024 18:47
…re-tests

# Conflicts:
#	code/build.gradle
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/bearer/BearerAuthenticationInterceptor.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/bearer/BearerAuthenticationManager.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/bearer/BearerTokenStorage.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/bearer/TokenResponse.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/common/AuthenticationManager.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/authentication/common/Credentials.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/http/MediaType.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/http/Status.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/interceptor/Interceptor.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/interceptor/InterceptorsChainExecutor.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/logging/LoggingInterceptor.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/logging/common/Constant.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/logging/common/LogMessageTag.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/logging/common/LoggableContentTypes.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/logging/common/LoggerDecorator.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupResponseParsingException.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/okhttp/BaseOkHttpClient.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/okhttp/OkHttpClientConfiguration.kt
#	code/src/main/kotlin/com/expediagroup/sdk/graphql/common/ApolloAliases.kt
#	code/src/main/kotlin/com/expediagroup/sdk/graphql/common/ApolloHttpEngine.kt
#	code/src/main/kotlin/com/expediagroup/sdk/graphql/common/DefaultGraphQLExecutor.kt
#	code/src/main/kotlin/com/expediagroup/sdk/graphql/common/GraphQLClient.kt
#	code/src/main/kotlin/com/expediagroup/sdk/lodgingconnectivity/configuration/ClientConfiguration.kt
#	code/src/main/kotlin/com/expediagroup/sdk/lodgingconnectivity/payment/PaymentClient.kt
#	code/src/main/kotlin/com/expediagroup/sdk/lodgingconnectivity/sandbox/SandboxDataManagementClient.kt
#	code/src/main/kotlin/com/expediagroup/sdk/lodgingconnectivity/supply/reservation/ReservationClient.kt
# Conflicts:
#	code/build.gradle
#	code/src/main/kotlin/com/expediagroup/sdk/core/http/Headers.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/http/RequestBody.kt
#	code/src/main/kotlin/com/expediagroup/sdk/core/http/ResponseBody.kt
@Mohammad-Dwairi Mohammad-Dwairi requested a review from a team as a code owner December 3, 2024 16:38
@Mohammad-Dwairi Mohammad-Dwairi merged commit f4741ff into main Dec 4, 2024
1 check passed
@Mohammad-Dwairi Mohammad-Dwairi deleted the mdwairi/initial-core-tests branch December 4, 2024 14:36
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.

4 participants