|
26 | 26 | import org.apache.taverna.robundle.manifest.PathMetadata;
|
27 | 27 | import org.commonwl.view.cwl.CWLTool;
|
28 | 28 | import org.commonwl.view.git.GitDetails;
|
| 29 | +import org.commonwl.view.git.GitSemaphore; |
29 | 30 | import org.commonwl.view.git.GitService;
|
30 | 31 | import org.commonwl.view.graphviz.GraphVizService;
|
31 | 32 | import org.commonwl.view.workflow.Workflow;
|
|
45 | 46 | import java.util.Set;
|
46 | 47 |
|
47 | 48 | import static org.junit.Assert.*;
|
48 |
| -import static org.mockito.Matchers.anyObject; |
49 |
| -import static org.mockito.Matchers.anyString; |
| 49 | +import static org.mockito.Matchers.*; |
50 | 50 | import static org.mockito.Mockito.when;
|
51 | 51 |
|
52 | 52 | public class ROBundleServiceTest {
|
@@ -76,7 +76,7 @@ public void generateAndSaveROBundle() throws Exception {
|
76 | 76 |
|
77 | 77 | // Get mock Git service
|
78 | 78 | GitService mockGitService = Mockito.mock(GitService.class);
|
79 |
| - when(mockGitService.getRepository(anyObject())).thenReturn(gitRepo); |
| 79 | + when(mockGitService.getRepository(anyObject(), anyBoolean())).thenReturn(gitRepo); |
80 | 80 |
|
81 | 81 | Set<HashableAgent> authors = new HashSet<>();
|
82 | 82 | authors. add( new HashableAgent( "Mark Robinson", null, new URI( "mailto:[email protected]")));
|
@@ -110,7 +110,7 @@ public void generateAndSaveROBundle() throws Exception {
|
110 | 110 | // Create new RO bundle
|
111 | 111 | ROBundleService bundleService = new ROBundleService(roBundleFolder.getRoot().toPath(),
|
112 | 112 | "CWL Viewer", "https://view.commonwl.org", 5242880,
|
113 |
| - mockGraphvizService, mockGitService, mockCwlTool); |
| 113 | + mockGraphvizService, mockGitService, Mockito.mock(GitSemaphore.class), mockCwlTool); |
114 | 114 | Bundle bundle = bundleService.createBundle(lobSTRv1, lobSTRv1RODetails);
|
115 | 115 | Path bundleRoot = bundle.getRoot().resolve("workflow");
|
116 | 116 |
|
@@ -173,7 +173,7 @@ public void filesOverLimit() throws Exception {
|
173 | 173 |
|
174 | 174 | // Get mock Git service
|
175 | 175 | GitService mockGitService = Mockito.mock(GitService.class);
|
176 |
| - when(mockGitService.getRepository(anyObject())).thenReturn(gitRepo); |
| 176 | + when(mockGitService.getRepository(anyObject(), anyBoolean())).thenReturn(gitRepo); |
177 | 177 |
|
178 | 178 | Set<HashableAgent> authors = new HashSet<>();
|
179 | 179 | authors. add( new HashableAgent( "Mark Robinson", null, new URI( "mailto:[email protected]")));
|
@@ -207,7 +207,7 @@ public void filesOverLimit() throws Exception {
|
207 | 207 | // Create new RO bundle
|
208 | 208 | ROBundleService bundleService = new ROBundleService(roBundleFolder.getRoot().toPath(),
|
209 | 209 | "CWL Viewer", "https://view.commonwl.org", 0, mockGraphvizService,
|
210 |
| - mockGitService, mockCwlTool); |
| 210 | + mockGitService, Mockito.mock(GitSemaphore.class), mockCwlTool); |
211 | 211 | Bundle bundle = bundleService.createBundle(lobSTRv1, lobSTRv1RODetails);
|
212 | 212 |
|
213 | 213 | Manifest manifest = bundle.getManifest();
|
|
0 commit comments