Skip to content

Test: Add unit tests for AudioHelper, UploadService, and AudioCombiner#46

Open
divyesh11 wants to merge 1 commit intomainfrom
write_test_cases
Open

Test: Add unit tests for AudioHelper, UploadService, and AudioCombiner#46
divyesh11 wants to merge 1 commit intomainfrom
write_test_cases

Conversation

@divyesh11
Copy link
Collaborator

This commit introduces unit tests for the following classes:

  • AudioHelper: Tests cover processing of silence/non-silence frames, clip time calculation, data removal, audio combination, and interaction with V2RxInternal.
  • UploadService: Tests verify audio processing logic, file generation based on audio data size, interaction with AudioHelper and V2RxInternal, and correct handling of clip indices.
  • AudioCombiner: Tests focus on the createWavHeader method, ensuring correct WAV header generation for various data sizes and sample rates, and verify stopPlaying can be called without exceptions.

The tests utilize Mockito for mocking dependencies.

Additionally, Mockito dependencies have been added to the build.gradle.kts file and libs.versions.toml.

This commit introduces unit tests for the following classes:
- `AudioHelper`: Tests cover processing of silence/non-silence frames, clip time calculation, data removal, audio combination, and interaction with `V2RxInternal`.
- `UploadService`: Tests verify audio processing logic, file generation based on audio data size, interaction with `AudioHelper` and `V2RxInternal`, and correct handling of clip indices.
- `AudioCombiner`: Tests focus on the `createWavHeader` method, ensuring correct WAV header generation for various data sizes and sample rates, and verify `stopPlaying` can be called without exceptions.

The tests utilize Mockito for mocking dependencies.

Additionally, Mockito dependencies have been added to the `build.gradle.kts` file and `libs.versions.toml`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant