|
@@ -30,7 +30,9 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
|
|
import org.springframework.web.util.NestedServletException;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import static org.mockito.Matchers.any;
|
|
|
import static org.mockito.Mockito.doNothing;
|
|
@@ -60,6 +62,7 @@ public class ScoreRuleControllerTest {
|
|
|
|
|
|
private List<ScoreRuleItemVO> devScoreRuleList;
|
|
|
private List<ScoreRuleItemVO> kibugscoreRuleList;
|
|
|
+ private Map<String, String> propersites;
|
|
|
|
|
|
@Before
|
|
|
public void setupMockMvc() throws Exception {
|
|
@@ -110,6 +113,11 @@ public class ScoreRuleControllerTest {
|
|
|
|
|
|
when(scoreRuleService.getKibugScoreRule(234,567)).thenReturn(kibugscoreRuleList);
|
|
|
when(scoreRuleService.getKibugScoreRule(345,678)).thenReturn(kibugscoreRuleList);
|
|
|
+ propersites = new HashMap<>();
|
|
|
+ propersites.put("testType", "7");
|
|
|
+ when(caseService.getCaseProperties(456L)).thenReturn(propersites);
|
|
|
+ when(caseService.getCaseProperties(567L)).thenReturn(propersites);
|
|
|
+ when(caseService.getCaseProperties(678L)).thenReturn(propersites);
|
|
|
}
|
|
|
|
|
|
@Test
|
|
@@ -122,6 +130,7 @@ public class ScoreRuleControllerTest {
|
|
|
List<ScoreRuleItemVO> scoreRules = new ArrayList<>();
|
|
|
scoreRules.add(scoreRuleItemVO);
|
|
|
List<String> options = new ArrayList<>();
|
|
|
+
|
|
|
options.add("string");
|
|
|
|
|
|
when(examService.getTask(123L)).thenReturn(exam);
|