package com.jay.monitor.data.server.store;

import com.jay.monitor.data.core.enums.MsgTypeEnums;
import com.jay.monitor.data.core.model.response.PageResponseModel;
import com.jay.monitor.data.server.SpringRunCase;
import com.jay.monitor.data.server.models.request.trace.MQRequest;
import com.jay.monitor.data.server.models.request.trace.SQLRequest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class TranceJsonManagerTest extends SpringRunCase {

    @Autowired
    private TranceJsonManager tranceJsonManager;

    @Test
    public void testSearchMQDataByList() throws Exception {
        MQRequest request = new MQRequest();
        request.setDataId("2766");
        PageResponseModel<Object> objectPageResponseModel =
            tranceJsonManager.searchDataByList(MsgTypeEnums.MQ, "210317", 1, 10, request);
        System.out.println(objectPageResponseModel);
    }

    @Test
    public void testSearchSQLDataByList() throws Exception {
        SQLRequest request = new SQLRequest();
        request.setDataId("1");
        PageResponseModel<Object> objectPageResponseModel =
            tranceJsonManager.searchDataByList(MsgTypeEnums.SQL, "210317", 1, 10, request);
        System.out.println(objectPageResponseModel);
    }
}