Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
682f20eb
Commit
682f20eb
authored
May 16, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5972 from izeye/test-20160514
* pr/5972: Fix Mockito tests to align with name and comments
parents
2fc86b2d
5759f685
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
MockBeanOnTestFieldForExistingBeanConfig.java
...ock/mockito/MockBeanOnTestFieldForExistingBeanConfig.java
+2
-1
MockBeanOnTestFieldForNewBeanIntegrationTests.java
...ockito/MockBeanOnTestFieldForNewBeanIntegrationTests.java
+1
-2
SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests.java
...yBeanOnTestFieldForExistingBeanCacheIntegrationTests.java
+2
-2
SpyBeanOnTestFieldForExistingBeanConfig.java
...mock/mockito/SpyBeanOnTestFieldForExistingBeanConfig.java
+2
-1
SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
...to/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
+2
-2
SpyBeanOnTestFieldForNewBeanIntegrationTests.java
...mockito/SpyBeanOnTestFieldForNewBeanIntegrationTests.java
+2
-3
No files found.
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanConfig.java
View file @
682f20eb
...
...
@@ -17,6 +17,7 @@
package
org
.
springframework
.
boot
.
test
.
mock
.
mockito
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.FailingExampleService
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
...
...
@@ -28,7 +29,7 @@ import org.springframework.context.annotation.Import;
* @author Phillip Webb
*/
@Configuration
@Import
(
ExampleServiceCaller
.
class
)
@Import
(
{
ExampleServiceCaller
.
class
,
FailingExampleService
.
class
}
)
public
class
MockBeanOnTestFieldForExistingBeanConfig
{
}
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForNewBeanIntegrationTests.java
View file @
682f20eb
...
...
@@ -22,7 +22,6 @@ import org.junit.runner.RunWith;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.mock.mockito.example.ExampleService
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.FailingExampleService
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.test.context.junit4.SpringRunner
;
...
...
@@ -51,7 +50,7 @@ public class MockBeanOnTestFieldForNewBeanIntegrationTests {
}
@Configuration
@Import
(
{
ExampleServiceCaller
.
class
,
FailingExampleService
.
class
}
)
@Import
(
ExampleServiceCaller
.
class
)
static
class
Config
{
}
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests.java
View file @
682f20eb
...
...
@@ -20,8 +20,8 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.mock.mockito.example.ExampleService
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.SimpleExampleService
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringRunner
;
...
...
@@ -42,7 +42,7 @@ import static org.mockito.Mockito.verify;
public
class
SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
{
@SpyBean
private
Simple
ExampleService
exampleService
;
private
ExampleService
exampleService
;
@Autowired
private
ExampleServiceCaller
caller
;
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanConfig.java
View file @
682f20eb
...
...
@@ -17,6 +17,7 @@
package
org
.
springframework
.
boot
.
test
.
mock
.
mockito
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.SimpleExampleService
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
...
...
@@ -28,7 +29,7 @@ import org.springframework.context.annotation.Import;
* @author Phillip Webb
*/
@Configuration
@Import
(
ExampleServiceCaller
.
class
)
@Import
(
{
ExampleServiceCaller
.
class
,
SimpleExampleService
.
class
}
)
public
class
SpyBeanOnTestFieldForExistingBeanConfig
{
}
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
View file @
682f20eb
...
...
@@ -20,8 +20,8 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.mock.mockito.example.ExampleService
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.SimpleExampleService
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringRunner
;
...
...
@@ -39,7 +39,7 @@ import static org.mockito.Mockito.verify;
public
class
SpyBeanOnTestFieldForExistingBeanIntegrationTests
{
@SpyBean
private
Simple
ExampleService
exampleService
;
private
ExampleService
exampleService
;
@Autowired
private
ExampleServiceCaller
caller
;
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForNewBeanIntegrationTests.java
View file @
682f20eb
...
...
@@ -20,7 +20,6 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.mock.mockito.example.ExampleService
;
import
org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller
;
import
org.springframework.boot.test.mock.mockito.example.SimpleExampleService
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -39,7 +38,7 @@ import static org.mockito.Mockito.verify;
public
class
SpyBeanOnTestFieldForNewBeanIntegrationTests
{
@SpyBean
private
ExampleService
exampleService
;
private
Simple
ExampleService
exampleService
;
@Autowired
private
ExampleServiceCaller
caller
;
...
...
@@ -51,7 +50,7 @@ public class SpyBeanOnTestFieldForNewBeanIntegrationTests {
}
@Configuration
@Import
(
{
ExampleServiceCaller
.
class
,
SimpleExampleService
.
class
}
)
@Import
(
ExampleServiceCaller
.
class
)
static
class
Config
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment