|
|
@@ -0,0 +1,41 @@
|
|
|
+package seecoder.devcloud.web.dao.pipeline;
|
|
|
+
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.mybatis.spring.annotation.MapperScan;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+import seecoder.devcloud.web.model.po.pipeline.StagePO;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author PuHong Weng
|
|
|
+ * @date 2021/4/14
|
|
|
+ * @description:
|
|
|
+ */
|
|
|
+@SpringBootTest
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@MapperScan(basePackages = {"seecoder.devcloud.web.dao"})
|
|
|
+class StageMapperTest {
|
|
|
+
|
|
|
+ private final StageMapper stageMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ StageMapperTest(StageMapper stageMapper) {
|
|
|
+ this.stageMapper = stageMapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void insert() {
|
|
|
+ StagePO stagePO = StagePO.builder()
|
|
|
+ .name("Maven测试并构建")
|
|
|
+ .description("构建打包过程")
|
|
|
+ .fakeConfigs(new HashMap<>())
|
|
|
+ .configs(new HashMap<>())
|
|
|
+ .title("Maven测试并构建")
|
|
|
+ .build();
|
|
|
+ stageMapper.insert(stagePO,"id","fakeConfigs","configs");
|
|
|
+ }
|
|
|
+}
|