Skip to content

Commit

Permalink
refactor: enhance test assertions in AnalyticRepositoryTest for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardoMeireles55 committed Feb 3, 2025
1 parent 47dbb74 commit d6b1c81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void testFindAllByLevel() {
.findByNameInAndLevelAndDateBetween(ANALYTICS_NAME_LIST, "PCCC1",
testDate.minusDays(1), testDate.plusDays(1), pageable)
.stream().toList();
assertThat(results).isNotEmpty();
assertThat(results.getFirst().level()).isEqualTo("PCCC1");
assertThat(results).as("Results should not be empty for the given date range").isNotEmpty();
assertThat(results.getFirst().level()).as("Level should match PCCC1").isEqualTo("PCCC1");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;

import static leonardo.labutilities.qualitylabpro.utils.AnalyticsHelperMocks.*;
import static org.junit.jupiter.api.Assertions.*;
Expand Down

0 comments on commit d6b1c81

Please sign in to comment.