Skip to content

Instantly share code, notes, and snippets.

@poad
Created July 6, 2014 01:07
Show Gist options
  • Save poad/c710f29afa4435b1084e to your computer and use it in GitHub Desktop.
Save poad/c710f29afa4435b1084e to your computer and use it in GitHub Desktop.
jMockit 1.9にしたらえらく変わってた ref: http://qiita.com/poad1010/items/7ac314ad79beb996d408
@MockClass(realClass=Hoge.class) // MockClassアノテーション廃止されてるせいで、コンパイラーさんがOKOKO
public class HogeMock {
}
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