|
|
@@ -0,0 +1,30 @@
|
|
|
+package com.finikes.oc.vote.service;
|
|
|
+
|
|
|
+import com.finikes.oc.App;
|
|
|
+import com.finikes.oc.vote.dto.VoteResultDto;
|
|
|
+import org.junit.jupiter.api.MethodOrderer;
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
+import org.junit.jupiter.api.TestMethodOrder;
|
|
|
+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.List;
|
|
|
+
|
|
|
+import static org.junit.jupiter.api.Assertions.*;
|
|
|
+
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest(classes = App.class)
|
|
|
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
|
|
+class VoteServiceTest {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private VoteService voteService;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void voteResult() {
|
|
|
+ List<VoteResultDto> list = voteService.voteResult(17);
|
|
|
+ list.forEach(System.out::println);
|
|
|
+ }
|
|
|
+}
|