|
|
@@ -39,6 +39,7 @@ import com.ruoyi.web.modules.diagnosis.MedicalResourceTestSamples;
|
|
39
|
39
|
import com.ruoyi.web.modules.diagnosis.domain.BizMedicalResource;
|
|
40
|
40
|
import com.ruoyi.web.modules.diagnosis.service.IBizMedicalResourceService;
|
|
41
|
41
|
import com.ruoyi.web.modules.diagnosis.support.MedicalResourceRules;
|
|
|
42
|
+import com.ruoyi.web.modules.diagnosis.support.MedicalResourceTypeValidator;
|
|
42
|
43
|
|
|
43
|
44
|
@ExtendWith(MockitoExtension.class)
|
|
44
|
45
|
@MockitoSettings(strictness = Strictness.LENIENT)
|
|
|
@@ -52,6 +53,9 @@ class BizMedicalResourceControllerApiTest
|
|
52
|
53
|
@Mock
|
|
53
|
54
|
private IBizMedicalResourceService bizMedicalResourceService;
|
|
54
|
55
|
|
|
|
56
|
+ @Mock
|
|
|
57
|
+ private MedicalResourceTypeValidator medicalResourceTypeValidator;
|
|
|
58
|
+
|
|
55
|
59
|
@InjectMocks
|
|
56
|
60
|
private BizMedicalResourceController controller;
|
|
57
|
61
|
|
|
|
@@ -100,7 +104,9 @@ class BizMedicalResourceControllerApiTest
|
|
100
|
104
|
mockMvc.perform(get("/diseaseTreatment/medicalResource/list")
|
|
101
|
105
|
.param("resourceType", MedicalResourceRules.RESOURCE_TYPE_VET)
|
|
102
|
106
|
.param("resourceName", "张")
|
|
103
|
|
- .param("publishStatus", "0"))
|
|
|
107
|
+ .param("publishStatus", "0")
|
|
|
108
|
+ .param("pageNum", "1")
|
|
|
109
|
+ .param("pageSize", "20"))
|
|
104
|
110
|
.andExpect(status().isOk())
|
|
105
|
111
|
.andExpect(jsonPath("$.code").value(200));
|
|
106
|
112
|
}
|