Skip to content

Commit

Permalink
do369에 대한 단위테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
silano08 committed Apr 21, 2024
1 parent 2f807fa commit 33de267
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions test/JavaPractice/ThreeSixNineGame/ContextTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package JavaPractice.ThreeSixNineGame;

import JavaPractice.ThreeSixNineGame.Rule.Busan369;
import JavaPractice.ThreeSixNineGame.Rule.ClapRule;
import JavaPractice.ThreeSixNineGame.Rule.Seoul369;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

import static org.junit.jupiter.api.Assertions.*;

class ContextTest {

@Test
void set369RuleSeoul() {
}

@ParameterizedTest
@CsvSource({
"3, clap",
"6, clap",
"9, clap",
"369, clap",
"1, '1'",
"10, '10'",
"29, 'clap'",
"30, clap",
"39, clap",
"40, '40'"
})
void doSeoul369(int number, String expected) {
ClapRule rule = new Seoul369();
assertEquals(expected, rule.do369(number));
}

@ParameterizedTest
@CsvSource({
"3, clap",
"66, clapclap",
"9, clap",
"369, clapclapclap",
"1, '1'",
"10, '10'",
"29, 'clap'",
"30, clap",
"39, clapclap",
"40, '40'"
})
void doBusan369(int number, String expected) {
ClapRule rule = new Busan369();
assertEquals(expected, rule.do369(number));
}

}

0 comments on commit 33de267

Please sign in to comment.