質問編集履歴
1
誤記修正
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
|
30
|
+
public void testA() {
|
31
31
|
new Expectations() {{
|
32
32
|
p.B();
|
33
33
|
result = new Delegate() {
|