Search in sources :

Example 1 with ArrayListMap

use of com.shizhefei.utils.ArrayListMap in project MVCHelper by LuckyJayce.

the class TestCaseFragment method getTestCaseDatas.

@Override
protected List<TestCaseData> getTestCaseDatas() {
    List<TestCaseData> datas = new ArrayList<TestCaseData>();
    TestCaseData caseData = new TestCaseData("测试登录", new LoginAsyncTask("LuckyJayce", "111"));
    caseData.addParamGet(new String[] { "name", "password" }, new IAsyncTask<Map<String, String>>() {

        @Override
        public RequestHandle execute(ResponseSender<Map<String, String>> sender) throws Exception {
            Map<String, String> map = new ArrayListMap<String, String>();
            map.put("name", "nnnnn");
            map.put("password", "ppppp");
            sender.sendData(map);
            return null;
        }
    });
    datas.add(caseData);
    datas.add(new TestCaseData("测试详情页", new BookDetailDataSource()));
    datas.add(new TestCaseData("测试搜索文章", new SearchBookDataSource("Java")));
    datas.add(new TestCaseData("测试文章列表", new BooksOkHttpNormal_DataSource()));
    return datas;
}
Also used : RequestHandle(com.shizhefei.mvc.RequestHandle) ArrayList(java.util.ArrayList) BooksOkHttpNormal_DataSource(com.shizhefei.test.models.datasource.okhttp.BooksOkHttpNormal_DataSource) BookDetailDataSource(com.shizhefei.test.models.datasource.BookDetailDataSource) TestCaseData(com.shizhefei.mvchelper.testcase.TestCaseData) SearchBookDataSource(com.shizhefei.test.models.datasource.SearchBookDataSource) ArrayListMap(com.shizhefei.utils.ArrayListMap) Map(java.util.Map) LoginAsyncTask(com.shizhefei.test.models.task.LoginAsyncTask)

Aggregations

RequestHandle (com.shizhefei.mvc.RequestHandle)1 TestCaseData (com.shizhefei.mvchelper.testcase.TestCaseData)1 BookDetailDataSource (com.shizhefei.test.models.datasource.BookDetailDataSource)1 SearchBookDataSource (com.shizhefei.test.models.datasource.SearchBookDataSource)1 BooksOkHttpNormal_DataSource (com.shizhefei.test.models.datasource.okhttp.BooksOkHttpNormal_DataSource)1 LoginAsyncTask (com.shizhefei.test.models.task.LoginAsyncTask)1 ArrayListMap (com.shizhefei.utils.ArrayListMap)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1