This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
b9a513a0
Commit
b9a513a0
authored
3 years ago
by
Michael Breu
Browse files
Options
Downloads
Patches
Plain Diff
Fixing more tests
parent
212986ee
2 merge requests
!91
Bringing JHipster7.6.0 to production
,
!88
Integrating Update to JHipster 7.6.0 back to Development
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-2
5 additions, 2 deletions
.gitlab-ci.yml
src/test/java/at/ac/uibk/gitsearch/testingUtilities/PropertiesTester.java
+12
-3
12 additions, 3 deletions
.../ac/uibk/gitsearch/testingUtilities/PropertiesTester.java
with
17 additions
and
5 deletions
.gitlab-ci.yml
+
5
−
2
View file @
b9a513a0
...
...
@@ -44,7 +44,8 @@ maven-test:
# - docker info
stage
:
test
script
:
-
./mvnw -ntp verify -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers
-
./mvnw -ntp test -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers
-
./mvnw -ntp integration-test -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers
artifacts
:
reports
:
junit
:
...
...
@@ -54,7 +55,8 @@ maven-test:
-
target/surefire-reports
-
target/failsafe-reports
-
target/site
expire_in
:
1 day
expire_in
:
30 day
allow_failure
:
true
frontend-test
:
stage
:
test
...
...
@@ -68,6 +70,7 @@ frontend-test:
-
target/test-results
-
target/jacoco
expire_in
:
1 day
allow_failure
:
true
sonar-analyze
:
stage
:
analyze
...
...
This diff is collapsed.
Click to expand it.
src/test/java/at/ac/uibk/gitsearch/testingUtilities/PropertiesTester.java
+
12
−
3
View file @
b9a513a0
...
...
@@ -78,11 +78,15 @@ public void testSetters(Class<?> beanClass, Object bean, String... setterExcepti
Object
property
=
null
;
if
(
Boolean
.
class
.
equals
(
type
)
||
boolean
.
class
.
equals
(
type
)
)
{
try
{
getter
=
beanClass
.
getMethod
(
"is"
+
propertyName
);
property
=
Boolean
.
TRUE
;
getter
=
beanClass
.
getMethod
(
"is"
+
propertyName
);
}
catch
(
NoSuchMethodException
|
SecurityException
e
)
{
LOGGER
.
info
(
"Cannot find getter for "
+
beanClass
.
getCanonicalName
()
+
"."
+
setter
.
getName
(),
e
);
try
{
getter
=
beanClass
.
getMethod
(
"get"
+
propertyName
);
}
catch
(
NoSuchMethodException
|
SecurityException
ex
)
{
LOGGER
.
info
(
"Cannot find getter (neither is... nor get... for "
+
beanClass
.
getCanonicalName
()
+
"."
+
setter
.
getName
(),
ex
);
return
;
}
}
}
else
{
try
{
...
...
@@ -130,7 +134,12 @@ public void testSetters(Class<?> beanClass, Object bean, String... setterExcepti
property
=
Collections
.
EMPTY_SET
;
}
else
if
(
Instant
.
class
.
isAssignableFrom
(
type
))
{
property
=
Instant
.
now
();
}
}
else
if
(
Float
.
class
.
isAssignableFrom
(
type
))
{
property
=
Float
.
valueOf
(
1.33f
);
}
else
if
(
Double
.
class
.
isAssignableFrom
(
type
))
{
property
=
Double
.
valueOf
(
1.77777d
);
}
else
if
(
type
.
isInterface
())
{
LOGGER
.
info
(
"Cannot instantiate interface {} in {} for class {}"
,
type
.
getName
(),
setter
.
getName
(),
bean
.
getClass
().
getName
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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