Browse Source

Merge branch '6.0.x'

pull/30402/head
Sam Brannen 3 years ago
parent
commit
dfd74495bd
  1. 10
      spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java
  2. 8
      spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java
  3. 10
      spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java

10
spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -111,13 +111,13 @@ public class MockServletContext implements ServletContext { @@ -111,13 +111,13 @@ public class MockServletContext implements ServletContext {
private final Map<String, ServletContext> contexts = new HashMap<>();
private int majorVersion = 3;
private int majorVersion = 6;
private int minorVersion = 1;
private int minorVersion = 0;
private int effectiveMajorVersion = 3;
private int effectiveMajorVersion = 6;
private int effectiveMinorVersion = 1;
private int effectiveMinorVersion = 0;
private final Map<String, RequestDispatcher> namedRequestDispatchers = new HashMap<>();

8
spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java

@ -105,10 +105,10 @@ class MockServletContextTests { @@ -105,10 +105,10 @@ class MockServletContextTests {
@Test
void servletVersion() {
assertThat(servletContext.getMajorVersion()).isEqualTo(3);
assertThat(servletContext.getMinorVersion()).isEqualTo(1);
assertThat(servletContext.getEffectiveMajorVersion()).isEqualTo(3);
assertThat(servletContext.getEffectiveMinorVersion()).isEqualTo(1);
assertThat(servletContext.getMajorVersion()).isEqualTo(6);
assertThat(servletContext.getMinorVersion()).isEqualTo(0);
assertThat(servletContext.getEffectiveMajorVersion()).isEqualTo(6);
assertThat(servletContext.getEffectiveMinorVersion()).isEqualTo(0);
servletContext.setMajorVersion(4);
servletContext.setMinorVersion(0);

10
spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -111,13 +111,13 @@ public class MockServletContext implements ServletContext { @@ -111,13 +111,13 @@ public class MockServletContext implements ServletContext {
private final Map<String, ServletContext> contexts = new HashMap<>();
private int majorVersion = 3;
private int majorVersion = 6;
private int minorVersion = 1;
private int minorVersion = 0;
private int effectiveMajorVersion = 3;
private int effectiveMajorVersion = 6;
private int effectiveMinorVersion = 1;
private int effectiveMinorVersion = 0;
private final Map<String, RequestDispatcher> namedRequestDispatchers = new HashMap<>();

Loading…
Cancel
Save