Skip to content

Commit

Permalink
OLMIS-7952: Fixed indentations.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsznaj committed Jul 9, 2024
1 parent df29544 commit 09b3e72
Showing 1 changed file with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ CalculatedStockOnHand generateInstance() {
private CalculatedStockOnHand generateInstance(UUID facility, UUID program, UUID product,
UUID lot) {
StockEvent event = new StockEventDataBuilder()
.withoutId()
.withFacility(facility)
.withProgram(program)
.build();
.withoutId()
.withFacility(facility)
.withProgram(program)
.build();

event = stockEventsRepository.save(event);

StockCard stockCard = new StockCardDataBuilder(event)
.withoutId()
.withoutId()
.withOrderableId(product)
.withLotId(lot)
.build();
.build();

stockCard = stockCardRepository.save(stockCard);

Expand All @@ -96,42 +96,42 @@ public void shouldReturnCalculatedStockOnHandsWhenNoStartDateProvided() {
calculatedStockOnHandRepository.save(calculatedStockOnHand3);

List<CalculatedStockOnHand> resultList1 = calculatedStockOnHandRepository
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 11, 1));
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 11, 1));

assertThat(resultList1, hasItems(calculatedStockOnHand1,
calculatedStockOnHand2, calculatedStockOnHand3));
calculatedStockOnHand2, calculatedStockOnHand3));
assertEquals(resultList1.size(), 3);

List<CalculatedStockOnHand> resultList2 = calculatedStockOnHandRepository
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 9, 15));
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 9, 15));

assertThat(resultList2, hasItems(calculatedStockOnHand1, calculatedStockOnHand2));
assertEquals(resultList2.size(), 2);

List<CalculatedStockOnHand> resultList3 = calculatedStockOnHandRepository
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 8, 15));
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 8, 15));

assertThat(resultList3, hasItems(calculatedStockOnHand1));
assertEquals(resultList3.size(), 1);

List<CalculatedStockOnHand> resultList4 = calculatedStockOnHandRepository
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 4, 15));
.findByStockCardIdInAndOccurredDateLessThanEqual(
asList(calculatedStockOnHand1.getStockCard().getId(),
calculatedStockOnHand2.getStockCard().getId(),
calculatedStockOnHand3.getStockCard().getId()),
LocalDate.of(2010, 4, 15));

assertTrue(resultList4.isEmpty());
assertEquals(resultList4.size(), 0);
Expand Down

0 comments on commit 09b3e72

Please sign in to comment.