From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/CommitmentServiceImplTest.kt | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/CommitmentServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/CommitmentServiceImplTest.kt index 1309fe1..165cb06 100644 --- a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/CommitmentServiceImplTest.kt +++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/CommitmentServiceImplTest.kt @@ -2,6 +2,8 @@ import cn.flightfeather.supervision.lightshare.service.CommitmentService import cn.flightfeather.supervision.lightshare.vo.CommitmentVo +import com.google.gson.Gson +import jdk.nashorn.internal.parser.JSONParser import org.apache.http.entity.ContentType import org.junit.Test import org.junit.jupiter.api.extension.ExtendWith @@ -14,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile import org.springframework.web.multipart.MultipartRequest import org.springframework.web.multipart.commons.CommonsMultipartFile +import springfox.documentation.spring.web.json.Json import java.io.ByteArrayInputStream import java.io.File import java.io.FileInputStream @@ -71,10 +74,10 @@ // }) //姹戒慨 - val signImg = File("target/test-file/car_stop.png") + val signImg = File("C:\\work\\vs\\ff-ai-ep\\asset\\mipmap\\boat_driving.png") val sign = MockMultipartFile("sign.png", FileInputStream(signImg)) val r = commitmentService.createLetterOfCommitment( - "ClOghpi60ZNUjb3f", CommitmentVo( + "QNhKL9lWOefS5iWn", Gson().toJson(CommitmentVo( "涓婃捣甯�", "寰愭眹鍖�", "鏌愭煇浼佷笟", @@ -92,7 +95,7 @@ "2022", "06", "29", - ), sign, null + )), sign, null ) println(r) } -- Gitblit v1.9.3