Skip to content

Instantly share code, notes, and snippets.

@ininmm
Created October 14, 2019 09:55
Show Gist options
  • Save ininmm/86e186fb0854d0574b10ffddcb535e66 to your computer and use it in GitHub Desktop.
Save ininmm/86e186fb0854d0574b10ffddcb535e66 to your computer and use it in GitHub Desktop.
Refactoring test
fun selectMaxValue(first: Int, second: Int, third: Int): Int {
......
return 正確的最大數
}
......
@Test
fun selectMaxValue_whenInputMaxValueIntoFirstParam_thenReturnMaxValue() {
val result = chooseTheMaxValue(6, 2, 1)
assertThat(result, `is`(6))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment