/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package test.com.pjilisense.flxai.controller;

import com.alibaba.fastjson.JSON;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import test.com.pjilisense.flxai.TestUtils;

import java.util.HashMap;
import java.util.Map;

public class ChunksControllerTest {
    @BeforeEach
    public void setUpTestDataWithinTransaction() {
        // set up test data within the transaction
    }
    @AfterEach
    public void tearDownWithinTransaction() {
        // execute "tear down" logic within the transaction
    }

    @Test
    public void testGetAllAiTools() {
        String url = TestUtils.WebconnectURL+"/api/robot/chunks/search";
        String charset = TestUtils.UTF8;
        try {
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("text","开源项目");
            params.put("userId","2f3c5337-cf1a-40ce-bbe3-ec45455d82f1");
            String body = TestUtils.doPost(url, JSON.toJSONString(params), charset);
            System.out.println(body);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}