對應的測試會像是:(這裡使用JUnit 4) ... assert matcher.matches(actual) ... Assert 也提供了 assertThat 方法,而且method signature 跟Hamcrest 的版本一樣,該用 ...
確定! 回上一頁