|
@@ -32,8 +32,7 @@ import java.util.*;
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
import static org.junit.Assert.assertFalse;
|
|
|
import static org.junit.Assert.assertTrue;
|
|
|
-import static org.mockito.Matchers.any;
|
|
|
-import static org.mockito.Matchers.anyList;
|
|
|
+import static org.mockito.Matchers.*;
|
|
|
import static org.mockito.Mockito.verify;
|
|
|
import static org.mockito.Mockito.when;
|
|
|
/**
|
|
@@ -355,8 +354,11 @@ public class ExamLogicImplTest {
|
|
|
public void test_getScoreBy(){
|
|
|
SubmitRecord at = new SubmitRecord();
|
|
|
ScoreVO scoreVO = new ScoreVO();
|
|
|
+ UserDTOForMT user = new UserDTOForMT();
|
|
|
+ user.setName("TEST");
|
|
|
when(submitRecordService.getAssignedTask(examVO.getId(),userId)).thenReturn(at);
|
|
|
when(scoreVOWrapper.wrap(at)).thenReturn(scoreVO);
|
|
|
+ when(userService.findByUserId(anyLong())).thenReturn(user);
|
|
|
|
|
|
ScoreVO result = examLogic.getScoreBy(examVO.getId(),userId);
|
|
|
assertEquals(scoreVO,result);
|