Created
July 6, 2014 01:07
-
-
Save poad/c710f29afa4435b1084e to your computer and use it in GitHub Desktop.
jMockit 1.9にしたらえらく変わってた ref: http://qiita.com/poad1010/items/7ac314ad79beb996d408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MockClass(realClass=Hoge.class) // MockClassアノテーション廃止されてるせいで、コンパイラーさんがOKOKO | |
public class HogeMock { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mockit.setUpMock(HogeMock.class); // ここでいねーよってコンパイラーさんがOKOKO | |
new Expectations() { | |
Fuga fuga; // これではMock化してくれないっぽい? | |
{ | |
this.fuga = new Fuga(); // 動かすとMockじゃないってJVMがOKOKO | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment