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
a9cecc86
Commit
a9cecc86
authored
May 31, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply TestPropertyValues to the context under test
Closes gh-9367
parent
2a3d7611
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
MixedNeo4jRepositoriesAutoConfigurationTests.java
...a/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java
+8
-11
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java
View file @
a9cecc86
...
@@ -64,8 +64,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
...
@@ -64,8 +64,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
@Test
@Test
public
void
testDefaultRepositoryConfiguration
()
throws
Exception
{
public
void
testDefaultRepositoryConfiguration
()
throws
Exception
{
TestPropertyValues
.
of
(
TestPropertyValues
.
of
(
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
this
.
context
.
register
(
TestConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
CountryRepository
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
CountryRepository
.
class
)).
isNotNull
();
...
@@ -73,8 +72,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
...
@@ -73,8 +72,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
@Test
@Test
public
void
testMixedRepositoryConfiguration
()
throws
Exception
{
public
void
testMixedRepositoryConfiguration
()
throws
Exception
{
TestPropertyValues
.
of
(
TestPropertyValues
.
of
(
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
"spring.datasource.initialize:false"
);
this
.
context
.
register
(
MixedConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
register
(
MixedConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
CountryRepository
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
CountryRepository
.
class
)).
isNotNull
();
...
@@ -83,8 +81,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
...
@@ -83,8 +81,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
@Test
@Test
public
void
testJpaRepositoryConfigurationWithNeo4jTemplate
()
throws
Exception
{
public
void
testJpaRepositoryConfigurationWithNeo4jTemplate
()
throws
Exception
{
TestPropertyValues
.
of
(
TestPropertyValues
.
of
(
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
this
.
context
.
register
(
JpaConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
register
(
JpaConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
...
@@ -93,8 +90,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
...
@@ -93,8 +90,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
@Test
@Test
@Ignore
@Ignore
public
void
testJpaRepositoryConfigurationWithNeo4jOverlap
()
throws
Exception
{
public
void
testJpaRepositoryConfigurationWithNeo4jOverlap
()
throws
Exception
{
TestPropertyValues
.
of
(
TestPropertyValues
.
of
(
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
"spring.datasource.initialize:false"
).
applyTo
(
this
.
context
);
this
.
context
.
register
(
OverlapConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
register
(
OverlapConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
...
@@ -103,9 +99,10 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
...
@@ -103,9 +99,10 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
@Test
@Test
public
void
testJpaRepositoryConfigurationWithNeo4jOverlapDisabled
()
public
void
testJpaRepositoryConfigurationWithNeo4jOverlapDisabled
()
throws
Exception
{
throws
Exception
{
TestPropertyValues
.
of
(
TestPropertyValues
"spring.datasource.initialize:false"
,
.
of
(
"spring.datasource.initialize:false"
,
"spring.data.neo4j.repositories.enabled:false"
).
applyTo
(
this
.
context
);
"spring.data.neo4j.repositories.enabled:false"
)
.
applyTo
(
this
.
context
);
this
.
context
.
register
(
OverlapConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
register
(
OverlapConfiguration
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
CityRepository
.
class
)).
isNotNull
();
...
...
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