日記
ついに年の瀬という感じですね.
今日書いたコード
切り上げのテストを書いた
@Test fun round_up() { onView(withId(R.id.cost_of_service_edit_text)) .perform(typeText("1.00")) onView(withId(R.id.calculate_button)) .perform(click()) onView(withId(R.id.tip_result)) .check(matches(withText(containsString("$1.00")))) } @Test fun do_not_round_up() { onView(withId(R.id.cost_of_service_edit_text)) .perform(typeText("1.00")) onView(withId(R.id.round_up_switch)) .perform(click()) onView(withId(R.id.calculate_button)) .perform(click()) onView(withId(R.id.tip_result)) .check(matches(withText(containsString("$0.20")))) }
感想
なし