teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

誤記修正

2017/01/26 14:09

投稿

homeless_heart2
homeless_heart2

スコア29

title CHANGED
File without changes
body CHANGED
@@ -7,12 +7,12 @@
7
7
  public class Person {
8
8
  private int weight = 0;
9
9
 
10
- public int A(){
10
+ public int A(){ // テスト対象
11
11
  B();
12
12
  return weight + 10;
13
13
  }
14
14
 
15
- public void B(){
15
+ public void B(){ // テスト時は挙動を変えたい
16
16
  weight = 50;
17
17
  }
18
18
  }
@@ -27,7 +27,7 @@
27
27
  int weight = 0;
28
28
 
29
29
  @Test
30
- public void testB() {
30
+ public void testA() {
31
31
  new Expectations() {{
32
32
  p.B();
33
33
  result = new Delegate() {