본문 바로가기

개발중/Spring

스프링 테스트 코드 작성하기

728x90
반응형

 

테스트 코드 작성하는 버릇을 들이니 오류가 줄어드는중

 

package com.rsn.POMS.api.crowdsourcing.labellingwork.service;


import com.rsn.POMS.api.crowdsourcing.labellingwork.vo.LabellingWorkVO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class LabellingWorkServiceTest {

    @Autowired
    LabellingWorkService labellingWorkService;

    @Test
    void 라빌링_작업_검증_유효성_검사_성공(){

        labellingWorkService.postLabellingWork(
                LabellingWorkVO.builder()
                        .pmSeq(1)
                        .acSeq(1)
                        .lsSeq(1)
                        .iSdate("2022-01-01")
                        .iEdate("2022-01-01")
                        .channelCd("1")
                        .searchSite("DC")
                        .dataCntPerWorker(150)
                        .workName("수빈 라벨링 작업 1")
                        .downloadAllowYn("Y")
                        .workSdate("2022-01-01")
                        .workEdate("2022-01-01")
                        .workerAssignYn("Y")
                        .workerSeqList("1,2")
                        .workStatus(1)
                        .useYn("Y")
                        .manualUploadYn("N")
                        .build()
        );
    }
}
728x90
반응형