File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
main/java/io/github/gunkim/baseball/domain
test/java/io/github/gunkim/baseball Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public Result match(final BallNumbers otherBalls) {
2121
2222 if (myBall .equals (otherBall )) {
2323 strike ++;
24- } else if (hasBallNumber (myBall )) {
24+ } else if (hasBallNumber (otherBall )) {
2525 ball ++;
2626 }
2727 }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ConsoleInputTest {
2828 }
2929
3030 @ Test
31- void test () {
31+ void 숫자_1에서_9_사이_숫자가_아닐_경우_예외가_발생한다 () {
3232 final InputScanner mockInputScanner = () -> "abc" ;
3333 final ConsoleInput consoleInput = new ConsoleInput (mockInputScanner , 3 );
3434
Original file line number Diff line number Diff line change 66import java .util .List ;
77import java .util .stream .Stream ;
88
9- import static org .junit .jupiter .api .Assertions .*;
9+ import static org .junit .jupiter .api .Assertions .assertAll ;
10+ import static org .junit .jupiter .api .Assertions .assertEquals ;
11+ import static org .junit .jupiter .api .Assertions .assertFalse ;
12+ import static org .junit .jupiter .api .Assertions .assertTrue ;
1013
1114@ DisplayName ("BallNumbers는" )
1215class BallNumbersTest {
@@ -47,11 +50,11 @@ class BallNumbersTest {
4750 }
4851
4952 @ Test
50- public void 숫자123과_숫자231은_1스트라이크_2볼이다 () {
53+ void 숫자123과_숫자231은_1스트라이크_2볼이다 () {
5154 final var ballNumbers = new BallNumbers (Stream .of (1 , 2 , 3 )
5255 .map (BallNumber ::of )
5356 .toList ());
54- final var otherBallNumbers = new BallNumbers (Stream .of (2 , 3 , 1 )
57+ final var otherBallNumbers = new BallNumbers (Stream .of (1 , 3 , 2 )
5558 .map (BallNumber ::of )
5659 .toList ());
5760
You can’t perform that action at this time.
0 commit comments