コード例 #1
0
 @Test
 public void should_return_2a0b_give_two_number_are_correct() {
   GuessNumber guessNumber = new GuessNumber("1234");
   String result = guessNumber.validate("1256");
   assertEquals("2a0b", result);
 }
コード例 #2
0
 @Test
 public void should_return_4a0b_given_all_digits_is_correct() {
   GuessNumber guessNumber = new GuessNumber("1234");
   String result = guessNumber.validate("1234");
   assertEquals("4a0b", result);
 }
コード例 #3
0
 @Test
 public void should_return_3a0b_given_partial_digits_are_correct() {
   GuessNumber guessNumber = new GuessNumber("1234");
   String result = guessNumber.validate("1235");
   assertEquals("3a0b", result);
 }