File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 25
25
import io .github .eocqrs .eokson .JsonOf ;
26
26
import io .github .eocqrs .eokson .MutableJson ;
27
27
import java .util .Map ;
28
+ import org .cactoos .Scalar ;
28
29
import org .cactoos .io .ResourceOf ;
29
30
import org .junit .jupiter .api .Test ;
30
31
import org .junit .jupiter .api .extension .ExtendWith ;
@@ -101,7 +102,7 @@ void createsNewProject() throws Exception {
101
102
final Platform platform = Mockito .mock (GithubPlatform .class );
102
103
Mockito .when (this .platforms .get (Mockito .any ()))
103
104
.thenReturn (platform );
104
- Mockito .when (this .projects .employ (Mockito .any (Project .class )))
105
+ Mockito .when (this .projects .employ (Mockito .any (Scalar .class )))
105
106
.thenReturn (
106
107
new Project (
107
108
"74bb5ec8-0e6b-4618-bfa4-a0b76b7b312d" ,
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ void employsProject() throws SQLException {
155
155
);
156
156
this .mock (expected );
157
157
Mockito .when (this .set .next ()).thenReturn (true );
158
- final Project project = this .projects .employ (expected );
158
+ final Project project = this .projects .employ (() -> expected );
159
159
MatcherAssert .assertThat (
160
160
"Project %s is null" .formatted (project ),
161
161
true ,
@@ -190,7 +190,7 @@ void throwsOnCreatingInvalidProject() throws SQLException {
190
190
new Assertion <>(
191
191
"Exception is not thrown or valid" ,
192
192
() -> this .projects .employ (
193
- new Project (
193
+ () -> new Project (
194
194
"Test Project" ,
195
195
"Location" ,
196
196
"Description" ,
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ void createsTicket() throws SQLException {
162
162
);
163
163
this .mock (expected );
164
164
Mockito .when (this .set .next ()).thenReturn (true );
165
- final Ticket ticket = this .tickets .create (expected );
165
+ final Ticket ticket = this .tickets .create (() -> expected );
166
166
MatcherAssert .assertThat (
167
167
"Ticket %s isn't created" .formatted (ticket ),
168
168
true ,
@@ -214,7 +214,7 @@ void throwsOnCreatingInvalidTicket() throws SQLException {
214
214
new Assertion <>(
215
215
"Exception is not thrown or valid" ,
216
216
() -> this .tickets .create (
217
- new Ticket (
217
+ () -> new Ticket (
218
218
UUID .randomUUID (),
219
219
35 ,
220
220
"user/repo" ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ void employsProject() {
105
105
"Description" ,
106
106
true
107
107
);
108
- final Project project = this .projects .employ (expected );
108
+ final Project project = this .projects .employ (() -> expected );
109
109
MatcherAssert .assertThat (
110
110
"Project %s is null" .formatted (project ),
111
111
true ,
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ void createsTicket() {
113
113
"path/to/job" ,
114
114
Ticket .Status .OPENED
115
115
);
116
- final Ticket ticket = this .tickets .create (expected );
116
+ final Ticket ticket = this .tickets .create (() -> expected );
117
117
MatcherAssert .assertThat (
118
118
"Ticket %s is null" .formatted (ticket ),
119
119
true ,
You can’t perform that action at this time.
0 commit comments