KMM :: Fix :: Change visibility of IgnoreNetworkResponseDecoder to public #3
Unit test report ✅
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.common.presenter.PresenterViewHolderTest.xml
2 tests were completed in 340ms with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.common.presenter.PresenterViewHolderTest | 2✅ | 340ms |
✅ com.harmony.kotlin.common.presenter.PresenterViewHolderTest
✅ assert view reference is cleared when lifecycle reaches destroyed state
✅ assert view is not null when lifecycle reaches any state except destroyed
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.cache.CacheSQLStorageDataSourceTests.xml
10 tests were completed in 2s with 10 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.cache.CacheSQLStorageDataSourceTests | 10✅ | 2s |
✅ com.harmony.kotlin.data.datasource.cache.CacheSQLStorageDataSourceTests
✅ should insert value when not exist
✅ should update value when exist
✅ should throw data not found exception when no values using get function
✅ should delete value
✅ should throw query not supported when query is invalid using put function
✅ should return value when exist
✅ should throw illegal argument exception when value is null
✅ should throw query not supported when query is invalid using delete function
✅ should throw query not supported when query is invalid using get function
✅ should delete all content of the database
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.DataSourceMapperTests.xml
3 tests were completed in 8s with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.DataSourceMapperTests | 3✅ | 8s |
✅ com.harmony.kotlin.data.datasource.DataSourceMapperTests
✅ should map delete operations
✅ should map put operations
✅ should map get operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.DataSourceQueryMapperTests.xml
6 tests were completed in 511ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.DataSourceQueryMapperTests | 6✅ | 511ms |
✅ com.harmony.kotlin.data.datasource.DataSourceQueryMapperTests
✅ put method error
✅ put method success
✅ get method success
✅ delete method success
✅ get method error
✅ delete method error
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.GetDataSourceMapperTests.xml
1 tests were completed in 141ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.GetDataSourceMapperTests | 1✅ | 141ms |
✅ com.harmony.kotlin.data.datasource.GetDataSourceMapperTests
✅ should map get operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.GetDataSourceValidatorTests.xml
2 tests were completed in 158ms with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.GetDataSourceValidatorTests | 2✅ | 158ms |
✅ com.harmony.kotlin.data.datasource.GetDataSourceValidatorTests
✅ should success when data is valid using get function
✅ should throw DataNotValidException when is not valid using get funtion
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.memory.InMemoryDataSourceTests.xml
10 tests were completed in 647ms with 10 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.memory.InMemoryDataSourceTests | 10✅ | 647ms |
✅ com.harmony.kotlin.data.datasource.memory.InMemoryDataSourceTests
✅ should throw QueryNotSupportedException if query is invalid when put function is called
✅ should delete value if exist
✅ should store value if query is valid when put function is called
✅ should throw IllegalArgumentException if the value is null when put function is called
✅ should response the value if exist
✅ should response the values if exist using get
✅ should throw DataNotFoundException if value is missing
✅ should throw QueryNotSupportedException if query is invalid when get function is called
✅ should throw QueryNotSupportedException if query is invalid when delete function is called
✅ should not fail because InvalidMutabilityException
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.network.DeleteNetworkDataSourceTest.xml
8 tests were completed in 1s with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.network.DeleteNetworkDataSourceTest | 8✅ | 1s |
✅ com.harmony.kotlin.data.datasource.network.DeleteNetworkDataSourceTest
✅ should propagate mapped exception when an exception is thrown
✅ should fail when unexpected query provided
✅ should throw exception when auth interactor fails
✅ should send request with expected headers
✅ should send request to expected url
✅ should send request with oauth
✅ should fail when query method is NOT DELETE
✅ should send DELETE request
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.network.GetNetworkDataSourceTests.xml
8 tests were completed in 614ms with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.network.GetNetworkDataSourceTests | 8✅ | 614ms |
✅ com.harmony.kotlin.data.datasource.network.GetNetworkDataSourceTests
✅ should throw illegal argument exception when interactor fails
✅ should successfully execute a get network request with oauth
✅ should successfully execute a get network request
✅ should throw exception when execute a get network request with oauth
✅ should fail when method is not Get
✅ should fail when query is invalid
✅ should successfully execute a get network request on a list
✅ should propagate the same exception as the mapper when an exception is thrown
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.network.NetworkErrorMappingTests.xml
3 tests were completed in 255ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.network.NetworkErrorMappingTests | 3✅ | 255ms |
✅ com.harmony.kotlin.data.datasource.network.NetworkErrorMappingTests
✅ should throw HttpException when backend returns any 40X minus 401 - 404 50X
✅ should throw DataNotFound when backend returns 404
✅ should throw UnauthorizedException when backend returns 401
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.network.PutNetworkDataSourceTest.xml
19 tests were completed in 1s with 19 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.network.PutNetworkDataSourceTest | 19✅ | 1s |
✅ com.harmony.kotlin.data.datasource.network.PutNetworkDataSourceTest
✅ should propagate mapped exception when an exception is thrown
✅ should send PUT request and get Unit when using IgnoreNetworkResponseDecoder
✅ should fail when unexpected query provided
✅ should fail when query method is PUT with content type and value provided
✅ should send PUT request as json
✅ should send PUT request and get Unit list when using IgnoreNetworkResponseDecoder for put
✅ should send request with expected headers
✅ should fail when query method is POST with content type and value provided
✅ should send PUT request and get same object that was sent
✅ should throw exception when execute a auth interactor fails
✅ should send POST request and get same object that was sent
✅ should fail when query method is DELETE
✅ should send request to expected url
✅ should fail when query method is GET
✅ should send PUT request with content type and get same object that was sent
✅ should send PUT request and get same object that was sent with oauth
✅ should send PUT request and get Unit when using Unit serializer
✅ should send PUT request as form data
✅ should send PUT request and get Unit list when using Unit serializer for put
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.PutDataSourceMapperTests.xml
1 tests were completed in 34ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.PutDataSourceMapperTests | 1✅ | 34ms |
✅ com.harmony.kotlin.data.datasource.PutDataSourceMapperTests
✅ should map put operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.RetryDataSourceTest.xml
5 tests were completed in 560ms with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.RetryDataSourceTest | 5✅ | 560ms |
✅ com.harmony.kotlin.data.datasource.RetryDataSourceTest
✅ should work when request works at second attempt
✅ should retry only with expected error
✅ should fail when all retries failed
✅ should not allow negative amount of executions
✅ should work when request works at first attempt
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.validator.ValidationServiceTest.xml
2 tests were completed in 3ms with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.validator.ValidationServiceTest | 2✅ | 3ms |
✅ com.harmony.kotlin.data.datasource.validator.ValidationServiceTest
✅ shouldValidateObjectImmediately_WhenAnyStrategyIsValid_GivenMoreThanOneStrategy$harmony_kotlin_release
✅ shouldInvalidateObjectImmediately_WhenAnyStrategyIsInvalid_GivenMoreThanOneStrategy$harmony_kotlin_release
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.datasource.validator.vastra.strategies.timestamp.TimestampValidationStrategyTest.xml
4 tests were completed in 169ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.datasource.validator.vastra.strategies.timestamp.TimestampValidationStrategyTest | 4✅ | 169ms |
✅ com.harmony.kotlin.data.datasource.validator.vastra.strategies.timestamp.TimestampValidationStrategyTest
✅ should_values_be_invalid_if_values_are_expired
✅ should_value_be_valid_if_value_is_not_expired
✅ should_values_be_valid_if_value_are_not_expired
✅ should_value_be_invalid_if_value_is_expired
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.CBORObjectToByteArrayMapperTests.xml
4 tests were completed in 62ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.CBORObjectToByteArrayMapperTests | 4✅ | 62ms |
✅ com.harmony.kotlin.data.mapper.CBORObjectToByteArrayMapperTests
✅ should decode list object from byte array to list object
✅ should encode successfully to ByteArray an object
✅ should decode object from byte array to object
✅ should encode successfully to ByteArray an object list
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.ClosureMapperTests.xml
1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.ClosureMapperTests | 1✅ | 0ms |
✅ com.harmony.kotlin.data.mapper.ClosureMapperTests
✅ should success
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.IdentityMapperTests.xml
1 tests were completed in 1ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.IdentityMapperTests | 1✅ | 1ms |
✅ com.harmony.kotlin.data.mapper.IdentityMapperTests
✅ should success
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.JsonMapperTests.xml
5 tests were completed in 44ms with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.JsonMapperTests | 5✅ | 44ms |
✅ com.harmony.kotlin.data.mapper.JsonMapperTests
✅ should map from json to model
✅ should throw MappingSerializationException when deserializing a not expected model
✅ should map from json to list of model
✅ should map from model to json
✅ should map from list to json
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.PaginationOffsetLimitMapperTests.xml
1 tests were completed in 1ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.PaginationOffsetLimitMapperTests | 1✅ | 1ms |
✅ com.harmony.kotlin.data.mapper.PaginationOffsetLimitMapperTests
✅ should success
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.mapper.VoidMapperTests.xml
1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.mapper.VoidMapperTests | 1✅ | 0ms |
✅ com.harmony.kotlin.data.mapper.VoidMapperTests
✅ should throw UnsupportedOperationException
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.CacheRepositoryTests.xml
24 tests were completed in 1s with 24 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.CacheRepositoryTests | 24✅ | 1s |
✅ com.harmony.kotlin.data.repository.CacheRepositoryTests
✅ should delete value from the cache datasource and main datasource when using CacheSyncOperation
✅ should delete value from the cache datasource when using CacheOperation
✅ should request to main datasource and store it into cache when calling get function with CacheSyncOperation given that cache value not valid
✅ should retrieve the value from the main datasource when calling get function with MainOperation
✅ should get cached value when calling get function with CacheOperation given that the object is not valid and fallback returns true
✅ should store value in cache datasource when using CacheOperation
✅ should delete value from the main datasource and cache datasource when using MainSyncOperation
✅ should store the response from the main datasource into the cache datasource when calling get function with MainSyncOperation
✅ should retrieve the value from the cache datasource when calling get function with CacheOperation
✅ should get cached value when function calling get function with CacheSyncOperation given that cached value isn't valid and fallback returns true
✅ should delete value from the main datasource when using MainOperation
✅ should throw operation not allowed using put function
✅ should store value in main datasource when using MainOperation
✅ should throw exception when calling get function function with CacheSyncOperation given that cache throws a exception and fallback returns false
✅ should throw ObjectNotValidException when calling get function with CacheOperation given that the object is not valid
✅ should throw operation not allowed using delete function
✅ should replicate MainSyncOperation behaviour when DefaultOperation is provided using put function
✅ should store the value first in main datasource and cache datasource when using MainSyncOperation
✅ should response the value from the cache when calling get function with CacheOperation and there is values within the cache
✅ should store the value first in cache datasource and main datasource when using CacheSyncOperation
✅ should throw operation not allowed when calling get function given an unsupported Operation
✅ should request to main datasource and store it into cache when calling get function with CacheSyncOperation given that cache value doesn't exist
✅ should return cache value when calling get function with CacheSyncOperation given that cache value exists and is valid
✅ should obtain the value from main when using CacheSyncOperation given that cache get function throws DataSerializationException
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.GetRepositoryMapperTests.xml
1 tests were completed in 102ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.GetRepositoryMapperTests | 1✅ | 102ms |
✅ com.harmony.kotlin.data.repository.GetRepositoryMapperTests
✅ should map get operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.PutRepositoryMapperTests.xml
1 tests were completed in 34ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.PutRepositoryMapperTests | 1✅ | 34ms |
✅ com.harmony.kotlin.data.repository.PutRepositoryMapperTests
✅ should map put operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.RepositoryMapperTests.xml
3 tests were completed in 128ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.RepositoryMapperTests | 3✅ | 128ms |
✅ com.harmony.kotlin.data.repository.RepositoryMapperTests
✅ should map delete operations
✅ should map put operations
✅ should map get operations
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.SingleDataSourceRepositoryTests.xml
3 tests were completed in 119ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.SingleDataSourceRepositoryTests | 3✅ | 119ms |
✅ com.harmony.kotlin.data.repository.SingleDataSourceRepositoryTests
✅ should successfully execute get function
✅ should successfully execute delete function
✅ should successfully execute put function
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.VoidDeleteRepositoriesTests.xml
1 tests were completed in 30ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.VoidDeleteRepositoriesTests | 1✅ | 30ms |
✅ com.harmony.kotlin.data.repository.VoidDeleteRepositoriesTests
✅ should throw not supported operation when delete function is executed
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.VoidGetRepositoriesTests.xml
1 tests were completed in 33ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.VoidGetRepositoriesTests | 1✅ | 33ms |
✅ com.harmony.kotlin.data.repository.VoidGetRepositoriesTests
✅ should throw not supported operation when get function is executed
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.VoidPutRepositoriesTests.xml
1 tests were completed in 35ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.VoidPutRepositoriesTests | 1✅ | 35ms |
✅ com.harmony.kotlin.data.repository.VoidPutRepositoriesTests
✅ should throw not supported operation when put function is executed
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.data.repository.VoidRepositoriesTests.xml
3 tests were completed in 90ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.data.repository.VoidRepositoriesTests | 3✅ | 90ms |
✅ com.harmony.kotlin.data.repository.VoidRepositoriesTests
✅ should throw not supported operation when get function is executed
✅ should throw not supported operation when delete function is executed
✅ should throw not supported operation when put function is executed
✅ harmony-kotlin/build/test-results/testReleaseUnitTest/TEST-com.harmony.kotlin.either.EitherTests.xml
5 tests were completed in 2ms with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.harmony.kotlin.either.EitherTests | 5✅ | 2ms |
✅ com.harmony.kotlin.either.EitherTests
✅ asSingleEither should transform a list of Either into a Either of List ignoring error when discardLeft is true
✅ eitherOf should not capture exception out of the defined one
✅ asSingleEither should transform into a Left Either when error happens
✅ asSingleEither should transform a list of Either into a Either of List
✅ eitherOf should capture defined exception