Merge branch '2.7.x'

Closes gh-31178
This commit is contained in:
Andy Wilkinson
2022-05-26 15:54:58 +01:00
68 changed files with 137 additions and 166 deletions

View File

@@ -135,7 +135,7 @@ class SpringBootContextLoaderTests {
}
@Test
void propertySourceOrdering() throws Exception {
void propertySourceOrdering() {
TestContext context = new ExposedTestContextManager(PropertySourceOrdering.class).getExposedTestContext();
ConfigurableEnvironment environment = (ConfigurableEnvironment) context.getApplicationContext()
.getEnvironment();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 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.
@@ -48,7 +48,7 @@ class MockBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests {
private ExampleServiceCaller caller;
@Test
void testMocking() throws Exception {
void testMocking() {
given(this.exampleService.greeting()).willReturn("Boot");
assertThat(this.caller.sayGreeting()).isEqualTo("I say Boot");
}

View File

@@ -53,7 +53,7 @@ class SpyBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests {
private ApplicationContext applicationContext;
@Test
void testMocking() throws Exception {
void testMocking() {
this.caller.sayGreeting();
then(this.service).should().greeting();
}

View File

@@ -47,7 +47,7 @@ class SpyBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests {
private ExampleServiceCaller caller;
@Test
void testSpying() throws Exception {
void testSpying() {
this.caller.sayGreeting();
then(this.exampleService).should().greeting();
}

View File

@@ -47,7 +47,7 @@ class SpyBeanWithJdkProxyTests {
private ExampleRepository repository;
@Test
void jdkProxyCanBeSpied() throws Exception {
void jdkProxyCanBeSpied() {
Example example = this.service.find("id");
assertThat(example.id).isEqualTo("id");
then(this.repository).should().find("id");