-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
test/JavaPractice/ThreeSixNineGame/ThreeSixNineGameTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package JavaPractice.ThreeSixNineGame; | ||
|
||
import JavaPractice.ThreeSixNineGame.Rule.Busan369; | ||
import JavaPractice.ThreeSixNineGame.Rule.Seoul369; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class ThreeSixNineGameTest { | ||
|
||
@Test | ||
void playGame() { | ||
} | ||
|
||
@Test | ||
void ruleChangeTest(){ | ||
|
||
Context context = new Context(); | ||
|
||
// 서울의 룰로하다가 | ||
|
||
context.set369Rule(new Seoul369()); | ||
assertEquals("clap", context.do369(33)); | ||
assertEquals("clap", context.do369(369)); | ||
|
||
// 부산의 룰로 체인지 | ||
|
||
context.set369Rule(new Busan369()); | ||
assertEquals("clapclapclap", context.do369(369)); | ||
assertEquals("clapclap", context.do369(33)); | ||
|
||
} | ||
|
||
} |