Jean-Francois Leveque

Injection par constructeur côté test.

...@@ -8,6 +8,7 @@ import org.junit.runner.RunWith; ...@@ -8,6 +8,7 @@ import org.junit.runner.RunWith;
8 import org.legrog.entities.Country; 8 import org.legrog.entities.Country;
9 import org.legrog.entities.Publisher; 9 import org.legrog.entities.Publisher;
10 import org.legrog.entities.PublisherVersion; 10 import org.legrog.entities.PublisherVersion;
11 +import org.legrog.web.xyz.SharedService;
11 import org.mockito.Answers; 12 import org.mockito.Answers;
12 import org.mockito.Mock; 13 import org.mockito.Mock;
13 import org.mockito.runners.MockitoJUnitRunner; 14 import org.mockito.runners.MockitoJUnitRunner;
...@@ -27,14 +28,11 @@ public class PublisherVersionViewTest { ...@@ -27,14 +28,11 @@ public class PublisherVersionViewTest {
27 28
28 private PublisherVersionView publisherVersionView; 29 private PublisherVersionView publisherVersionView;
29 30
30 - @Mock
31 - private PublisherService publisherService;
32 -
33 private PublisherVersion publisherVersion; 31 private PublisherVersion publisherVersion;
34 32
35 @Before 33 @Before
36 - public void setUp() { 34 + public void setUp(@Mock PublisherService publisherService, @Mock SharedService sharedService) {
37 - publisherVersionView = new PublisherVersionView(); 35 + publisherVersionView = new PublisherVersionView(publisherService, sharedService);
38 publisherVersionView.setEditMode(false); 36 publisherVersionView.setEditMode(false);
39 publisherVersionView.setNewPublisher(false); 37 publisherVersionView.setNewPublisher(false);
40 38
......