Skip to content

Return number #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/main/java/FizzBuzz.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
public class FizzBuzz {

// TODO 2.リファクタリング 変数名
// TODO 3.リファクタリング メソッド名 (option)
public String say(int hoga) {
return String.valueOf(2);
public String convert(int number) {
return String.valueOf(number);
}
}
// TODO これは不要コメント
9 changes: 7 additions & 2 deletions src/test/java/FizzBuzzTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ public void setUp() {

@Test
public void 数字を返すこと_2() {
assertEquals("2", fizzbuss.say(2));
assertEquals("2", fizzbuss.convert(2));
}
// TODO 1. 数値2以外のケースでも期待通り数字返すことを確認

@Test
public void 数字を返すこと_4() {
assertEquals("4", fizzbuss.convert(4));
}

}
}