Slide 10
Slide 10 text
1.
assertThat() をひたすら並べる
10
/**
*
検索索結果を表します
*/
public
class
SearchResultDto
{
/**
検索索条件に合致する結果の総数 */
public
Integer
numAllItems;
/**
検索索を開始した開始位置 */
public
Integer
fromIndex;
/**
取得した件数 */
public
Integer
numItemsInPage;
/**
検索索された⽇日時 */
public
Date
searchedAt;
/**
書籍情報 */
public
List
items;
}
assertThat(actual.numAllItems,
is(100));
assertThat(actual.fromIndex,
is(20));
assertThat(actual.numItemsInPage,
is(10));
//
searchedAt はあえて⽐比較しない
assertThat(actual.items,
hasSize(2));
assertThat(actual.items.get(0).id,
is(123));
...
L さしみたんぽぽ作業過ぎてつらい…