11package chess .domain .board ;
22
3- import chess .domain .command .MoveParameters ;
3+ import chess .domain .command .MoveOptions ;
44import chess .domain .player .Position ;
55import org .junit .jupiter .api .DisplayName ;
66import org .junit .jupiter .api .Test ;
@@ -34,11 +34,11 @@ void move_source_position_empty() {
3434 Board board = new Board ();
3535 Position source = Position .of ("b3" );
3636 Position target = Position .of ("b4" );
37- MoveParameters moveParameters = new MoveParameters (source , target );
37+ MoveOptions moveOptions = new MoveOptions (source , target );
3838
3939 //when, then
4040 assertThatIllegalArgumentException ()
41- .isThrownBy (() -> board .move (moveParameters , true ))
41+ .isThrownBy (() -> board .move (moveOptions , true ))
4242 .withMessage ("해당 위치에 기물이 존재하지 않습니다." );
4343 }
4444
@@ -50,11 +50,11 @@ void move_source_not_owner(String sourcePosition, String targetPosition, boolean
5050 Board board = new Board ();
5151 Position source = Position .of (sourcePosition );
5252 Position target = Position .of (targetPosition );
53- MoveParameters moveParameters = new MoveParameters (source , target );
53+ MoveOptions moveOptions = new MoveOptions (source , target );
5454
5555 //when, then
5656 assertThatIllegalArgumentException ()
57- .isThrownBy (() -> board .move (moveParameters , isWhiteTurn ))
57+ .isThrownBy (() -> board .move (moveOptions , isWhiteTurn ))
5858 .withMessage ("자신의 기물만 움직일 수 있습니다." );
5959 }
6060
@@ -66,11 +66,11 @@ void move_source_and_target_same_color(String sourcePosition, String targetPosit
6666 Board board = new Board ();
6767 Position source = Position .of (sourcePosition );
6868 Position target = Position .of (targetPosition );
69- MoveParameters moveParameters = new MoveParameters (source , target );
69+ MoveOptions moveOptions = new MoveOptions (source , target );
7070
7171 //when, then
7272 assertThatIllegalArgumentException ()
73- .isThrownBy (() -> board .move (moveParameters , isWhiteTurn ))
73+ .isThrownBy (() -> board .move (moveOptions , isWhiteTurn ))
7474 .withMessage ("같은 색상의 기물은 공격할 수 없습니다." );
7575 }
7676
@@ -82,11 +82,11 @@ void move_source_and_target_same(String sourcePosition, String targetPosition, b
8282 Board board = new Board ();
8383 Position source = Position .of (sourcePosition );
8484 Position target = Position .of (targetPosition );
85- MoveParameters moveParameters = new MoveParameters (source , target );
85+ MoveOptions moveOptions = new MoveOptions (source , target );
8686
8787 //when, then
8888 assertThatIllegalArgumentException ()
89- .isThrownBy (() -> board .move (moveParameters , isWhiteTurn ))
89+ .isThrownBy (() -> board .move (moveOptions , isWhiteTurn ))
9090 .withMessage ("출발 위치와 도착 위치가 같을 수 없습니다." );
9191 }
9292
@@ -98,11 +98,11 @@ void move_invalid_paths(String sourcePosition, String targetPosition, boolean is
9898 Board board = new Board ();
9999 Position source = Position .of (sourcePosition );
100100 Position target = Position .of (targetPosition );
101- MoveParameters moveParameters = new MoveParameters (source , target );
101+ MoveOptions moveOptions = new MoveOptions (source , target );
102102
103103 //when, then
104104 assertThatIllegalArgumentException ()
105- .isThrownBy (() -> board .move (moveParameters , isWhiteTurn ))
105+ .isThrownBy (() -> board .move (moveOptions , isWhiteTurn ))
106106 .withMessage ("기물을 통과하여 이동할 수 없습니다." );
107107 }
108108
@@ -112,11 +112,11 @@ void move_invalid_paths(String sourcePosition, String targetPosition, boolean is
112112 void move_king_invalid_target (String source , String target ) {
113113 //given
114114 Board board = setBoardToAttackKing ();
115- MoveParameters moveParameters = new MoveParameters (Position .of (source ), Position .of (target ));
115+ MoveOptions moveOptions = new MoveOptions (Position .of (source ), Position .of (target ));
116116
117117 //when, then
118118 assertThatIllegalArgumentException ()
119- .isThrownBy (() -> board .move (moveParameters , true ))
119+ .isThrownBy (() -> board .move (moveOptions , true ))
120120 .withMessage ("킹은 상대방이 공격 가능한 위치로 이동할 수 없습니다." );
121121 }
122122
@@ -136,20 +136,20 @@ void get_status() {
136136
137137 private Board setBoardToGetStatus () {
138138 Board board = new Board ();
139- board .move (new MoveParameters (Position .of ("e7" ), Position .of ("e5" )), false );
140- board .move (new MoveParameters (Position .of ("e5" ), Position .of ("e4" )), false );
141- board .move (new MoveParameters (Position .of ("e4" ), Position .of ("e3" )), false );
142- board .move (new MoveParameters (Position .of ("d2" ), Position .of ("e3" )), true );
139+ board .move (new MoveOptions (Position .of ("e7" ), Position .of ("e5" )), false );
140+ board .move (new MoveOptions (Position .of ("e5" ), Position .of ("e4" )), false );
141+ board .move (new MoveOptions (Position .of ("e4" ), Position .of ("e3" )), false );
142+ board .move (new MoveOptions (Position .of ("d2" ), Position .of ("e3" )), true );
143143 return board ;
144144 }
145145
146146 private Board setBoardToAttackKing () {
147147 Board board = new Board ();
148- board .move (new MoveParameters (Position .of ("e2" ), Position .of ("e4" )), true );
149- board .move (new MoveParameters (Position .of ("d2" ), Position .of ("d4" )), true );
150- board .move (new MoveParameters (Position .of ("e1" ), Position .of ("e2" )), true );
151- board .move (new MoveParameters (Position .of ("c7" ), Position .of ("c5" )), false );
152- board .move (new MoveParameters (Position .of ("d8" ), Position .of ("a5" )), false );
148+ board .move (new MoveOptions (Position .of ("e2" ), Position .of ("e4" )), true );
149+ board .move (new MoveOptions (Position .of ("d2" ), Position .of ("d4" )), true );
150+ board .move (new MoveOptions (Position .of ("e1" ), Position .of ("e2" )), true );
151+ board .move (new MoveOptions (Position .of ("c7" ), Position .of ("c5" )), false );
152+ board .move (new MoveOptions (Position .of ("d8" ), Position .of ("a5" )), false );
153153 return board ;
154154 }
155155}
0 commit comments