test: adjust commments
All checks were successful
CI / Get Changed Files (pull_request) Successful in 11s
CI / eslint (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
Setup Gitea Tea CLI / setup-and-login (pull_request) Successful in 1m38s
CI / Docker frontend validation (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 18s
CI / Checkstyle Main (pull_request) Successful in 1m14s
CI / Backend Tests (pull_request) Successful in 2m16s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 11s
CI / eslint (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
Setup Gitea Tea CLI / setup-and-login (pull_request) Successful in 1m38s
CI / Docker frontend validation (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 18s
CI / Checkstyle Main (pull_request) Successful in 1m14s
CI / Backend Tests (pull_request) Successful in 2m16s
This commit is contained in:
parent
78b8f4696c
commit
3e1c15e023
1 changed files with 8 additions and 8 deletions
|
@ -105,7 +105,7 @@ class DiceServiceTest {
|
|||
void play_rollOver_targetValueOne_rolledOne_lose() {
|
||||
diceDto.setRollOver(true);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(1));
|
||||
when(random.nextInt(anyInt())).thenReturn(0); // rolledValue = 1
|
||||
when(random.nextInt(anyInt())).thenReturn(0);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -120,7 +120,7 @@ class DiceServiceTest {
|
|||
void play_rollOver_targetValueOne_rolledTwo_win() {
|
||||
diceDto.setRollOver(true);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(1));
|
||||
when(random.nextInt(anyInt())).thenReturn(1); // rolledValue = 2
|
||||
when(random.nextInt(anyInt())).thenReturn(1);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -136,7 +136,7 @@ class DiceServiceTest {
|
|||
void play_rollUnder_targetValueOne_alwaysLose_winChanceZero() {
|
||||
diceDto.setRollOver(false);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(1));
|
||||
when(random.nextInt(anyInt())).thenReturn(0); // rolledValue = 1
|
||||
when(random.nextInt(anyInt())).thenReturn(0);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -151,7 +151,7 @@ class DiceServiceTest {
|
|||
void play_rollOver_targetValueNinetyNine_rolledHundred_win() {
|
||||
diceDto.setRollOver(true);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(99));
|
||||
when(random.nextInt(anyInt())).thenReturn(99); // rolledValue = 100
|
||||
when(random.nextInt(anyInt())).thenReturn(99);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -167,7 +167,7 @@ class DiceServiceTest {
|
|||
void play_rollUnder_targetValueNinetyNine_rolledNinetyEight_win() {
|
||||
diceDto.setRollOver(false);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(99));
|
||||
when(random.nextInt(anyInt())).thenReturn(97); // rolledValue = 98
|
||||
when(random.nextInt(anyInt())).thenReturn(97);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -183,7 +183,7 @@ class DiceServiceTest {
|
|||
void play_rollOver_targetValueOneHundred_alwaysLose_winChanceZero() {
|
||||
diceDto.setRollOver(true);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(100));
|
||||
when(random.nextInt(anyInt())).thenReturn(99); // rolledValue = 100
|
||||
when(random.nextInt(anyInt())).thenReturn(99);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
@ -196,9 +196,9 @@ class DiceServiceTest {
|
|||
|
||||
@Test
|
||||
void play_rollUnder_targetValueOneHundred_rolledNinetyNine_win() {
|
||||
diceDto.setRollOver(false); // Assuming a typo in original, should be setRollOver(false)
|
||||
diceDto.setRollOver(false);
|
||||
diceDto.setTargetValue(BigDecimal.valueOf(100));
|
||||
when(random.nextInt(anyInt())).thenReturn(98); // rolledValue = 99
|
||||
when(random.nextInt(anyInt())).thenReturn(98);
|
||||
|
||||
DiceResult result = diceService.play(user, diceDto);
|
||||
|
||||
|
|
Reference in a new issue