Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
broken-petclinic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Smart
broken-petclinic
Commits
4a477313
Commit
4a477313
authored
11 years ago
by
michaelisvy
Browse files
Options
Downloads
Plain Diff
Merge pull request #38 from arey/master
Fixes #37 with other default locale than english
parents
53abaf51
076a124e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java
+3
-0
3 additions, 0 deletions
...ringframework/samples/petclinic/model/ValidatorTests.java
with
3 additions
and
0 deletions
src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java
+
3
−
0
View file @
4a477313
package
org.springframework.samples.petclinic.model
;
import
java.util.Locale
;
import
java.util.Set
;
import
javax.validation.ConstraintViolation
;
...
...
@@ -10,6 +11,7 @@ import org.junit.Assert;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.i18n.LocaleContextHolder
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.validation.beanvalidation.LocalValidatorFactoryBean
;
...
...
@@ -32,6 +34,7 @@ public class ValidatorTests {
@Test
public
void
emptyFirstName
()
{
LocaleContextHolder
.
setLocale
(
Locale
.
ENGLISH
);
Person
person
=
new
Person
();
person
.
setFirstName
(
""
);
person
.
setLastName
(
"smith"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment