Jean-Francois Leveque

Injection par constructeur côté test.

......@@ -8,6 +8,7 @@ import org.junit.runner.RunWith;
import org.legrog.entities.Country;
import org.legrog.entities.Publisher;
import org.legrog.entities.PublisherVersion;
import org.legrog.web.xyz.SharedService;
import org.mockito.Answers;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
......@@ -27,14 +28,11 @@ public class PublisherVersionViewTest {
private PublisherVersionView publisherVersionView;
@Mock
private PublisherService publisherService;
private PublisherVersion publisherVersion;
@Before
public void setUp() {
publisherVersionView = new PublisherVersionView();
public void setUp(@Mock PublisherService publisherService, @Mock SharedService sharedService) {
publisherVersionView = new PublisherVersionView(publisherService, sharedService);
publisherVersionView.setEditMode(false);
publisherVersionView.setNewPublisher(false);
......