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
97874a07
Commit
97874a07
authored
Jun 20, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build failure
parent
f28e3d54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
TestEntityScanTests.java
...pringframework/boot/context/scan/TestEntityScanTests.java
+7
-3
ServletComponentScanRegistrarTests.java
.../boot/web/servlet/ServletComponentScanRegistrarTests.java
+7
-1
No files found.
spring-boot/src/test/java/org/springframework/boot/context/scan/TestEntityScanTests.java
View file @
97874a07
...
...
@@ -28,6 +28,8 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.core.annotation.AnnotationConfigurationException
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
hamcrest
.
CoreMatchers
.
allOf
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
/**
* Tests for {@link TestEntityScan}.
...
...
@@ -77,9 +79,11 @@ public class TestEntityScanTests {
@Test
public
void
valueAndBasePackagesThrows
()
throws
Exception
{
this
.
thrown
.
expect
(
AnnotationConfigurationException
.
class
);
this
.
thrown
.
expectMessage
(
"attribute 'value' and its alias 'basePackages' are declared"
);
this
.
thrown
.
expectMessage
(
"com.mycorp.entity"
);
this
.
thrown
.
expectMessage
(
"com.mycorp"
);
this
.
thrown
.
expectMessage
(
allOf
(
containsString
(
"'value'"
),
containsString
(
"'basePackages'"
),
containsString
(
"com.mycorp.entity"
),
containsString
(
"com.mycorp"
)));
new
AnnotationConfigApplicationContext
(
ValueAndBasePackages
.
class
);
}
...
...
spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java
View file @
97874a07
...
...
@@ -26,6 +26,8 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.core.annotation.AnnotationConfigurationException
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
hamcrest
.
CoreMatchers
.
allOf
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
/**
* Tests for {@link ServletComponentScanRegistrar}
...
...
@@ -76,7 +78,11 @@ public class ServletComponentScanRegistrarTests {
@Test
public
void
packagesConfiguredWithBothValueAndBasePackages
()
{
this
.
thrown
.
expect
(
AnnotationConfigurationException
.
class
);
this
.
thrown
.
expectMessage
(
"attribute 'value' and its alias 'basePackages' are declared"
);
this
.
thrown
.
expectMessage
(
allOf
(
containsString
(
"'value'"
),
containsString
(
"'basePackages'"
),
containsString
(
"com.example.foo"
),
containsString
(
"com.example.bar"
)));
new
AnnotationConfigApplicationContext
(
ValueAndBasePackages
.
class
);
}
...
...
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