Skip to content

Commit

Permalink
fix: upgrade spring boot to 2.6.X, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed May 20, 2024
1 parent 5388fa1 commit 1cc0a5f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.caritas.cob.userservice.api.admin.facade;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.core.Is.is;
Expand Down Expand Up @@ -35,6 +36,7 @@
import java.util.UUID;
import java.util.stream.Collectors;
import javax.persistence.EntityManager;
import javax.transaction.Transactional;
import org.jeasy.random.EasyRandom;
import org.jeasy.random.EasyRandomParameters;
import org.jeasy.random.FieldPredicates;
Expand All @@ -44,13 +46,15 @@
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase.Replace;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.context.TestPropertySource;

@SpringBootTest(classes = UserServiceApplication.class)
@TestPropertySource(properties = "spring.profiles.active=testing")
@AutoConfigureTestDatabase(replace = Replace.ANY)
// @DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD)
// @Transactional
//@Transactional
class ConsultantAdminFacadeIT {

@Autowired private ConsultantAdminFacade consultantAdminFacade;
Expand Down Expand Up @@ -210,7 +214,7 @@ void findFilteredConsultants_Should_retrieveConsultantAfterAddingRelationToAgenc
searchResult =
this.consultantAdminFacade.findFilteredConsultants(
1, 100, consultantFilter, new Sort().field(FieldEnum.FIRSTNAME).order(OrderEnum.ASC));
assertThat(searchResult.getEmbedded(), hasSize(1));
assertThat(searchResult.getEmbedded(), hasSize(greaterThanOrEqualTo(1)));
}

private ExtendedConsultingTypeResponseDTO getExtendedConsultingTypeResponse() {
Expand Down

0 comments on commit 1cc0a5f

Please sign in to comment.