Skip to content

Instantly share code, notes, and snippets.

@ymtky
Created May 11, 2017 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymtky/55d131138e259dfe77aa6d8a2f0f2e52 to your computer and use it in GitHub Desktop.
Save ymtky/55d131138e259dfe77aa6d8a2f0f2e52 to your computer and use it in GitHub Desktop.
JMockitのメモ
//モックを宣言
@Mocked
Hoge hoge;
//フィールドへの差込み
Deencapsulation.setField(hoge, "field" ,"hugahuga");
//メソッドへの差込み
when(hoge.get()).thenReturn("hugahuga"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment