@@ -118,10 +118,9 @@ void firstSubmission_passed() {
118118
119119 // then
120120 then (submissionRepository ).should ().saveSubmission (any ());
121- then (ctx ).should ().incrementTotalSubmissions ();
122- then (ctx ).should ().incrementCorrectSubmissions ();
123121 then (userProblemResultRepository ).should ().saveUserProblemResult (any ());
124- assertThat (submissionResult .isSolved ()).isFalse ();
122+ assertThat (submissionResult .isSolved ()).isTrue ();
123+ assertThat (submissionResult .hasBeenSolved ()).isFalse ();
125124 }
126125
127126 @ Test
@@ -159,10 +158,9 @@ void firstSubmission_failed() {
159158
160159 // then
161160 then (submissionRepository ).should ().saveSubmission (any ());
162- then (ctx ).should ().incrementTotalSubmissions ();
163- then (ctx ).should (never ()).incrementCorrectSubmissions ();
164161 then (userProblemResultRepository ).should ().saveUserProblemResult (any ());
165162 assertThat (submissionResult .isSolved ()).isFalse ();
163+ assertThat (submissionResult .hasBeenSolved ()).isFalse ();
166164 }
167165
168166 @ Test
@@ -200,10 +198,9 @@ void retryAfterWrong_passed() {
200198
201199 // then
202200 then (submissionRepository ).should ().saveSubmission (any ());
203- then (ctx ).should ().incrementTotalSubmissions ();
204- then (ctx ).should ().incrementCorrectSubmissions ();
205201 then (userProblemResultRepository ).should ().updateUserProblemResult (userProblemResult , true );
206- assertThat (submissionResult .isSolved ()).isFalse ();
202+ assertThat (submissionResult .isSolved ()).isTrue ();
203+ assertThat (submissionResult .hasBeenSolved ()).isFalse ();
207204 }
208205
209206 @ Test
@@ -241,11 +238,10 @@ void retryAfterWrong_failedAgain() {
241238
242239 // then
243240 then (submissionRepository ).should ().saveSubmission (any ());
244- then (ctx ).should ().incrementTotalSubmissions ();
245- then (ctx ).should (never ()).incrementCorrectSubmissions ();
246241 then (userProblemResultRepository ).should (never ())
247242 .updateUserProblemResult (any (UserProblemResult .class ), anyBoolean ());
248243 assertThat (submissionResult .isSolved ()).isFalse ();
244+ assertThat (submissionResult .hasBeenSolved ()).isFalse ();
249245 }
250246
251247 @ Test
@@ -283,11 +279,10 @@ void retryAfterCorrect_passedAgain() {
283279
284280 // then
285281 then (submissionRepository ).should ().saveSubmission (any ());
286- then (ctx ).should ().incrementTotalSubmissions ();
287- then (ctx ).should (never ()).incrementCorrectSubmissions ();
288282 then (userProblemResultRepository ).should (never ())
289283 .updateUserProblemResult (any (UserProblemResult .class ), anyBoolean ());
290- assertThat (submissionResult .isSolved ()).isTrue ();
284+ assertThat (submissionResult .isSolved ()).isFalse ();
285+ assertThat (submissionResult .hasBeenSolved ()).isTrue ();
291286 }
292287
293288 @ Test
0 commit comments