BAEL-6346 - Fixes according to editor comments
This commit is contained in:
parent
55769583dd
commit
c8f82ab48e
@ -1,4 +1,3 @@
|
|||||||
server.port=0
|
|
||||||
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
|
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
|
||||||
spring.datasource.username=sa
|
spring.datasource.username=sa
|
||||||
spring.datasource.password=sa
|
spring.datasource.password=sa
|
||||||
|
@ -17,7 +17,7 @@ import com.baeldung.spring.notamanagedtype.missedentityscan.repository.CorrectEn
|
|||||||
|
|
||||||
class NotManagedTypeExceptionIntegrationTest {
|
class NotManagedTypeExceptionIntegrationTest {
|
||||||
@Test
|
@Test
|
||||||
void givenEntityWithoutAnnotationApplication_WhenBootstrap_ThenExpectedExceptionThrown() {
|
void givenEntityWithoutAnnotationApplication_whenBootstrap_thenExpectedExceptionThrown() {
|
||||||
Exception exception = assertThrows(Exception.class,
|
Exception exception = assertThrows(Exception.class,
|
||||||
() -> run(EntityWithoutAnnotationApplication.class));
|
() -> run(EntityWithoutAnnotationApplication.class));
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ class NotManagedTypeExceptionIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenEntityWithoutAnnotationApplicationFixed_WhenBootstrap_ThenRepositoryBeanShouldBePresentInContext() {
|
void givenEntityWithoutAnnotationApplicationFixed_whenBootstrap_thenRepositoryBeanShouldBePresentInContext() {
|
||||||
ConfigurableApplicationContext context = run(EntityWithoutAnnotationFixedApplication.class);
|
ConfigurableApplicationContext context = run(EntityWithoutAnnotationFixedApplication.class);
|
||||||
EntityWithoutAnnotationFixedRepository repository = context
|
EntityWithoutAnnotationFixedRepository repository = context
|
||||||
.getBean(EntityWithoutAnnotationFixedRepository.class);
|
.getBean(EntityWithoutAnnotationFixedRepository.class);
|
||||||
@ -36,7 +36,7 @@ class NotManagedTypeExceptionIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenEntityWithJakartaAnnotationApplication_WhenBootstrap_ThenExpectedExceptionThrown() {
|
void givenEntityWithJakartaAnnotationApplication_whenBootstrap_thenExpectedExceptionThrown() {
|
||||||
Exception exception = assertThrows(Exception.class,
|
Exception exception = assertThrows(Exception.class,
|
||||||
() -> run(EntityWithJakartaAnnotationApplication.class));
|
() -> run(EntityWithJakartaAnnotationApplication.class));
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class NotManagedTypeExceptionIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenWrongEntityScanApplication_WhenBootstrap_ThenExpectedExceptionThrown() {
|
void givenWrongEntityScanApplication_whenBootstrap_thenExpectedExceptionThrown() {
|
||||||
Exception exception = assertThrows(Exception.class,
|
Exception exception = assertThrows(Exception.class,
|
||||||
() -> run(WrongEntityScanApplication.class));
|
() -> run(WrongEntityScanApplication.class));
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class NotManagedTypeExceptionIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenWrongEntityScanApplicationFixed_WhenBootstrap_ThenRepositoryBeanShouldBePresentInContext() {
|
void givenWrongEntityScanApplicationFixed_whenBootstrap_thenRepositoryBeanShouldBePresentInContext() {
|
||||||
ConfigurableApplicationContext context = run(WrongEntityScanFixedApplication.class);
|
ConfigurableApplicationContext context = run(WrongEntityScanFixedApplication.class);
|
||||||
CorrectEntityRepository repository = context
|
CorrectEntityRepository repository = context
|
||||||
.getBean(CorrectEntityRepository.class);
|
.getBean(CorrectEntityRepository.class);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user