一枚程序員眼中的單元測試(4)
發表于:2017-09-11來源:袁慎建作者:袁慎建點擊數:
標簽:單元測試
StringUtilsTest { @Test void convert_to_upper_case () throws Exception { assertThat ( StringUtils . toUpperCase ( unit-test ), is ( UNIT-TEST )); } } 這一 小段 測試代碼所做的事情是在 驗證
StringUtilsTest {
@Test
void convert_to_upper_case() throws Exception {
assertThat(StringUtils.toUpperCase("unit-test"), is("UNIT-TEST"));
}
}