Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TousAntiCovid sources
Cléa Server
Commits
af451453
Commit
af451453
authored
Apr 20, 2021
by
Jujube Orange
Browse files
un-rename abiguous property repository
parent
615c6a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
clea-venue-consumer/src/test/java/fr/gouv/clea/consumer/service/impl/SlotGenerationTest.java
View file @
af451453
...
...
@@ -35,7 +35,7 @@ public class SlotGenerationTest {
final
VenueConsumerConfiguration
config
=
new
VenueConsumerConfiguration
();
@Mock
IExposedVisitRepository
repository
Service
;
IExposedVisitRepository
repository
;
@Mock
IStatService
statService
;
...
...
@@ -48,7 +48,7 @@ public class SlotGenerationTest {
@BeforeEach
void
init
()
{
config
.
setDurationUnitInSeconds
(
Duration
.
ofMinutes
(
30
).
toSeconds
());
service
=
new
VisitExpositionAggregatorService
(
repository
Service
,
config
,
statService
);
service
=
new
VisitExpositionAggregatorService
(
repository
,
config
,
statService
);
}
@Test
...
...
@@ -67,7 +67,7 @@ public class SlotGenerationTest {
* => firstExposedSlot = 16-2 = 14
* => lastExposedSlot = 16+2 = 18
*/
verify
(
repository
Service
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
verify
(
repository
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
assertThat
(
exposedVisitEntitiesCaptor
.
getValue
())
.
extracting
(
ExposedVisitEntity:
:
getTimeSlot
)
.
containsExactly
(
14
,
15
,
16
,
17
,
18
);
...
...
@@ -89,7 +89,7 @@ public class SlotGenerationTest {
* => firstExposedSlot = 0
* => lastExposedSlot = 0+1 = 1
*/
verify
(
repository
Service
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
verify
(
repository
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
assertThat
(
exposedVisitEntitiesCaptor
.
getValue
())
.
extracting
(
ExposedVisitEntity:
:
getTimeSlot
)
.
containsExactly
(
0
,
1
);
...
...
@@ -112,7 +112,7 @@ public class SlotGenerationTest {
* => firstExposedSlot = 0
* => lastExposedSlot = 0+3-1 = 2
*/
verify
(
repository
Service
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
verify
(
repository
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
assertThat
(
exposedVisitEntitiesCaptor
.
getValue
())
.
extracting
(
ExposedVisitEntity:
:
getTimeSlot
)
.
containsExactly
(
0
,
1
,
2
);
...
...
@@ -129,7 +129,7 @@ public class SlotGenerationTest {
service
.
updateExposureCount
(
visit
);
verify
(
repository
Service
,
never
()).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
verify
(
repository
,
never
()).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
}
@Test
...
...
@@ -152,7 +152,7 @@ public class SlotGenerationTest {
* => firstExposedSlot = 10
* => lastExposedSlot = 6
*/
verify
(
repository
Service
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
verify
(
repository
).
saveAll
(
exposedVisitEntitiesCaptor
.
capture
());
assertThat
(
exposedVisitEntitiesCaptor
.
getValue
())
.
extracting
(
ExposedVisitEntity:
:
getTimeSlot
)
.
containsExactly
(
6
,
7
,
8
,
9
,
10
);
...
...
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