package cn.sagacloud.server.algorithm.test

import cn.sagacloud.server.algorithm.models.message.MessageType
import cn.sagacloud.server.algorithm.services.message.MessageService
import com.alibaba.fastjson.JSON
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner

/**
 *
 *
 * @author jxing
 */
@RunWith(SpringRunner::class)
@SpringBootTest
class FastJsonTest {

    @Autowired
    lateinit var messageService : MessageService

    @Test
    fun enumTest(){
        var messageEntity = messageService.buildMessageEntity("test", MessageType.Success,
                "Pj1101080001", arrayListOf("aaa", "bbb"), "测试消息, 没有下载", "下载", "", "test.xlsx")

        println(JSON.toJSONString(messageEntity))

    }
}