Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
John Samuel Ako Deutesfeld
ARSnova Backend
Commits
c856ffe1
There was an error fetching the commit references. Please try again later.
Commit
c856ffe1
authored
6 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Fix repository method mock for test
Mock the correct method.
parent
6987618d
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/thm/arsnova/service/DefaultEntityServiceImplTest.java
+2
-1
2 additions, 1 deletion
.../de/thm/arsnova/service/DefaultEntityServiceImplTest.java
with
2 additions
and
1 deletion
src/test/java/de/thm/arsnova/service/DefaultEntityServiceImplTest.java
+
2
−
1
View file @
c856ffe1
...
...
@@ -27,6 +27,7 @@ import java.util.Map;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
mockito
.
AdditionalAnswers
.
returnsFirstArg
;
import
static
org
.
mockito
.
Matchers
.
anyListOf
;
import
static
org
.
mockito
.
Mockito
.
any
;
import
static
org
.
mockito
.
Mockito
.
when
;
...
...
@@ -87,7 +88,7 @@ public class DefaultEntityServiceImplTest {
final
DefaultEntityServiceImpl
<
Room
>
entityService
=
new
DefaultEntityServiceImpl
<>(
Room
.
class
,
roomRepository
,
objectMapper
);
entityService
.
setApplicationEventPublisher
(
eventPublisher
);
when
(
roomRepository
.
save
(
any
(
Room
.
class
))).
then
(
returnsFirstArg
());
when
(
roomRepository
.
save
All
(
any
ListOf
(
Room
.
class
))).
then
(
returnsFirstArg
());
List
<
Room
>
sessions
=
new
ArrayList
<>();
final
String
originalId1
=
"d8833f0d78964a9487ded02ba2dfbbad"
;
...
...
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