|
@@ -1,16 +1,39 @@
|
|
|
-//package com.mooctest.crowd.site;
|
|
|
-//
|
|
|
-//import com.mooctest.crowd.site.service.AgencyService;
|
|
|
-//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;
|
|
|
-//
|
|
|
-//@RunWith(SpringRunner.class)
|
|
|
-//@SpringBootTest
|
|
|
-//public class SiteApplicationTests {
|
|
|
-// @Autowired
|
|
|
-// private AgencyService agencyService;
|
|
|
-//
|
|
|
-//
|
|
|
-//}
|
|
|
+package com.mooctest.crowd.site;
|
|
|
+
|
|
|
+import com.mooctest.crowd.domain.dao.CrowdTestProjectDao;
|
|
|
+import com.mooctest.crowd.domain.model.CrowdTestProjectPO;
|
|
|
+import com.mooctest.crowd.site.service.AgencyService;
|
|
|
+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;
|
|
|
+
|
|
|
+import java.util.Optional;
|
|
|
+
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest
|
|
|
+public class SiteApplicationTests {
|
|
|
+ @Autowired
|
|
|
+ private CrowdTestProjectDao crowdTestProjectDao;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void test(){
|
|
|
+ Optional<CrowdTestProjectPO> crowdTestProjectPO=crowdTestProjectDao.findById(223l);
|
|
|
+ CrowdTestProjectPO crowdTestProjectPO1=crowdTestProjectPO.get();
|
|
|
+ crowdTestProjectPO1.setStatus(5);
|
|
|
+ crowdTestProjectDao.save(crowdTestProjectPO1);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|