标签:tle idt margin ext fitnesse blog image number body
2017-09-28
Query Table的格式如下:
Query:employees hired before | 10-Dec-1980 | |||
company number | employee number | first name | last name | hire date |
4808147 | 9942 | Bill | Mitchell | 19-Dec-1966 |
4808147 | 1429 | Bob | Martin | 10-Oct-1975 |
也可以让单元为空,测试是会自动填上:
Query:employees hired before | 10-Dec-1980 | ||
employee number | first name | last name | hire date |
1429 | |||
8832 |
源代码:
package util; import java.util.Date; import java.util.List; import static java.util.Arrays.asList; public class EmployeesHiredBefore { public EmployeesHiredBefore(Date date) { } public void table(List<List<String>> table) { // optional function } public List<List<List<String>>> query() { return asList( // table level asList( // row level asList("company number", "4808147"), // cell column name, value asList("employee number", "1429"), asList("first name", "Bob"), asList("last name", "Martin"), asList("hire date", "10-Oct-1974") ), asList( asList("company number", "5123122"), asList("employee number", "8832"), asList("first name", "James"), asList("last name", "Grenning"), asList("hire date", "15-Dec-1979") ) ); } }
图1 测试结果
说明:
标签:tle idt margin ext fitnesse blog image number body
原文地址:http://www.cnblogs.com/Ming8006/p/7607127.html