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 Disabled Unit Tests in ReportServiceImplTest class #11

Open
pmoustopoulos opened this issue Jun 6, 2023 · 0 comments
Open

Fix Disabled Unit Tests in ReportServiceImplTest class #11

pmoustopoulos opened this issue Jun 6, 2023 · 0 comments

Comments

@pmoustopoulos
Copy link
Owner

pmoustopoulos commented Jun 6, 2023

Issue Description

The ReportServiceImplTest class in the src/test/java/com/ainigma100/departmentapi/service/impl/ directory has two disabled unit tests.

The first test, givenNoInput_whenGenerateAndZipReports_thenReturnFileDTO, is meant to verify that the method generates and zips reports correctly when there is data available. It sets up mock data and mock behavior for the dependencies and asserts that the resulting FileDTO object is not null and contains the expected file content. The verification is done using various verify statements to ensure that the dependencies are invoked with the expected arguments.

The second test, givenNoInput_whenGenerateAndZipReports_thenReturnFileDTOWithEmptyContent, is meant to verify the behavior when there is no data available for the reports. It sets up mock data and behavior to simulate an empty result from the repository and asserts that the resulting FileDTO object is not null but has a null file content. Similarly, the dependencies' invocations are verified using verify statements.

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

No branches or pull requests

1 participant