Skip to content

Conversation

@KimGyeongLock
Copy link

애매한 점

image

  • 라이브러리가 작동하지 않는다.
  • import java.util.Random;, import java.util.Scanner; 사용해버림
  • 숫자로 인풋을 받는다.
    => 그래서 기존의 test code가 작동되지 않음
    => 테스트 코드 따로 작성

Copy link
Member

@yohanii yohanii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으셨습니다!

개선할 점을 말씀드리면,
함수들이 다소 긴 느낌이 있어서, 작은 단위로 분리하면 가독성이 더 높아질 거 같아요!
파일을 분리해서, 클래스의 역할과 책임에 대해 생각해보시면 더 좋을 것 같습니다ㅎㅎ (저도 잘 못하지만..)

좋았던 점은
테스트를 여러 경우에 맞게 꼼꼼히 잘 작성하신 것 같고,
출력을 테스트하신 것도 좋았습니다!
또, validate를 잘 작성하신 것 같습니다! 👍👍

}

//컴퓨터의 랜덤한 수 생성 함수
public static int createRandomNumber() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for문이나, while문으로 작성하는 방법을 생각해보시면 더 좋을 것 같습니다!

}

// 잘못된 입력 예외 처리 함수
public static void validateNumber(int number) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate를 꼼꼼히 잘 하셨네요👍


@Test
@DisplayName("checkNumber 메서드는 정확한 결과를 반환해야 한다")
void testCheckNumber() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3경우를 따로 만들면 더 좋을 것 같아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants