嘿嘿,JAVA里第一次运行单元测试成功,立存
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                嘿嘿,JAVA里第一次运行单元测试成功,立存
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                按書上寫的單元測試。
居然一次過,爽!!!
package org.smart4j.chapter2.test;import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.smart4j.chapter2.model.Customer; import org.smart4j.chapter2.service.CustomerService; /*** Created by sahara on 2016/3/16.*/ public class CustomerServiceTest {private final CustomerService customerService;public CustomerServiceTest() {customerService = new CustomerService();}@Beforepublic void init() {// TODO }@Testpublic void getCutomerListTest() throws Exception {List<Customer> customerList = customerService.getCustomerList();Assert.assertEquals(2, customerList.size());} }總結
以上是生活随笔為你收集整理的嘿嘿,JAVA里第一次运行单元测试成功,立存的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: php excel文件导出之二 图像导出
- 下一篇: 火狐已阻止载入混合活动内容“http:/
