Skip to content

Commit

Permalink
Update to Spring Boot 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MediaMarco committed Dec 19, 2024
1 parent 0bc6659 commit 258cd6a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
springBootVersion = '3.3.5'
springVersion = '6.1.12'
springBootVersion = '3.4.0'
springVersion = '6.2.1'
tomcatVersion = '10.1.34'
seleniumVersion = '4.27.0'
jacksonVersion = '2.18.2'
Expand Down
4 changes: 1 addition & 3 deletions web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
implementation 'org.yaml:snakeyaml:2.3'
implementation("org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}")
implementation("de.otto.edison:edison-core:3.3.3")
implementation("de.otto.edison:edison-core:3.4.0")

//Update hibernate validator that comes with edison-core
implementation("org.hibernate.validator:hibernate-validator:8.0.2.Final")
Expand All @@ -26,8 +26,6 @@ dependencies {
testImplementation("org.awaitility:awaitility:4.2.2")

annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"


}

configurations {
Expand Down
11 changes: 5 additions & 6 deletions web/src/test/java/de/otto/jlineup/web/ReportControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
Expand All @@ -38,7 +38,7 @@
@WebAppConfiguration
public class ReportControllerTest {

@MockBean
@MockitoBean
private JLineupService jLineupService;

@Autowired
Expand All @@ -47,7 +47,7 @@ public class ReportControllerTest {
private MockMvc mockMvc;

@Before
public void setupMockMvc(){
public void setupMockMvc() {

initMocks(this);

Expand Down Expand Up @@ -102,11 +102,10 @@ public void shouldGetReportsPageWithOrderedReports() throws Exception {
));



//when
ModelAndView modelAndView = mockMvc.perform(get("/jlineup-ctxpath/internal/reports").contextPath("/jlineup-ctxpath").accept(MediaType.TEXT_HTML))

//then
//then
.andExpect(status().isOk())
.andExpect(view().name("reports"))
.andExpect(model().attributeExists("reportList"))
Expand All @@ -126,7 +125,7 @@ public void shouldGetReportsPageWithOrderedReports() throws Exception {
.andReturn().getModelAndView();

@SuppressWarnings("unchecked")
List<ReportController.Report> reportList = (List<ReportController.Report>)modelAndView.getModelMap().get("reportList");
List<ReportController.Report> reportList = (List<ReportController.Report>) modelAndView.getModelMap().get("reportList");

assertThat(reportList.get(0).getId(), is("someId"));
assertThat(reportList.get(0).getName(), is("someName"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package de.otto.jlineup.web.configuration;

import de.otto.jlineup.service.JLineupService;
import org.mockito.Mock;

public class JLineupTestConfiguration {

@Mock
public JLineupService jLineupService;

}

0 comments on commit 258cd6a

Please sign in to comment.