0
0

More than 3 years have passed since last update.

[WIP] Java テストコード

Posted at

概要

Javaのテストコードの基本について纏めます。

テストコード考え方

  • 取れない値はモックを用意 (例:API,DBなど)
  • Boolを返すファンクションに対して何も値をセットしない場合falseを返す
  • モックで値がなんでも良い場合any()を利用
  • targetsで実際のファンクションをコール
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0