日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Spock0.6發(fā)布Java測(cè)試框架

Spock 0.6 發(fā)布,Spock 0.6 增加對(duì) Groovy 1.8, Groovy 2.0, and Grails 2.0 的支持,詳細(xì)的改進(jìn)記錄請(qǐng)看這里。

Spock 是適合 Java 和 Groovy 應(yīng)用程序的一個(gè)測(cè)試框架。示例代碼:

 
 
 
  1. import groovy.sql.Sql  
  2.  
  3. import spock.lang.*  
  4.  
  5. class DatabaseDriven extends Specification {  
  6.   @Shared sql = Sql.newInstance("jdbc:h2:mem:", "org.h2.Driver")  
  7.    
  8.   // normally an external database would be used,  
  9.   // and the test data wouldn't have to be inserted here  
  10.   def setupSpec() {  
  11.     sql.execute("create table maxdata (id int primary key, a int, b int, c int)")  
  12.     sql.execute("insert into maxdata values (1, 3, 7, 7), (2, 5, 4, 5), (3, 9, 9, 9)")  
  13.   }  
  14.  
  15.   def "maximum of two numbers"() {  
  16.     expect:  
  17.     Math.max(a, b) == c  
  18.  
  19.     where:  
  20.     [a, b, c] << sql.rows("select a, b, c from maxdata")  
  21.   }  

下載地址:http://code.google.com/p/spock/downloads/list


當(dāng)前標(biāo)題:Spock0.6發(fā)布Java測(cè)試框架
文章網(wǎng)址:http://www.5511xx.com/article/cdoooji.html