Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit a5883c1

Browse files
committed
Rename method
1 parent e1a5bc0 commit a5883c1

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

src/test/java/com/mathworks/ci/systemtests/RunMATLABTestsArtifactsIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void verifyCustomFilePathInputForArtifacts() throws Exception{
162162
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
163163
project.getBuildWrappersList().add(this.buildWrapper);
164164

165-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
165+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
166166

167167

168168
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
@@ -200,7 +200,7 @@ public void verifyCustomFilenamesForArtifactsPipeline() throws Exception {
200200
" stage('Run MATLAB Command') {\n" +
201201
" steps\n" +
202202
" {\n" +
203-
" unzip '" + Utilities.getRunMATLABTestsData().getPath() + "'" + "\n" +
203+
" unzip '" + Utilities.getURLForTestData().getPath() + "'" + "\n" +
204204
" runMATLABTests(sourceFolder:['src'], testResultsTAP: 'test-results/results.tap',\n" +
205205
" testResultsPDF: 'test-results/results.pdf',\n" +
206206
" testResultsJUnit: 'test-results/results.xml',\n" +
@@ -231,7 +231,7 @@ public void verifyCoverageReportDoesNotIncludeOtherSourceFolder() throws Excepti
231231
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
232232
project.getBuildWrappersList().add(this.buildWrapper);
233233

234-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
234+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
235235

236236
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
237237
testingBuilder.setCoberturaArtifact(new RunMatlabTestsBuilder.CoberturaArtifact("TestArtifacts/coberturaresult.xml"));

src/test/java/com/mathworks/ci/systemtests/RunMATLABTestsIT.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void verifyBuildStepWithMatlabTestBuilder() throws Exception {
7979
public void verifyRunMATLABTestsWithAllInputs() throws Exception {
8080
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
8181
project.getBuildWrappersList().add(this.buildWrapper);
82-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
82+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
8383

8484
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
8585
testingBuilder.setLoggingLevel("None");
@@ -173,7 +173,7 @@ public void verifyOutputDetailSetToDefault() throws Exception {
173173
public void verifyMultipleSourceFolders() throws Exception {
174174
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
175175
project.getBuildWrappersList().add(this.buildWrapper);
176-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
176+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
177177

178178
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
179179
testingBuilder.setLoggingLevel("None");
@@ -198,7 +198,7 @@ public void verifyMultipleSourceFolders() throws Exception {
198198
public void verifyMultipleTestFolders() throws Exception {
199199
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
200200
project.getBuildWrappersList().add(this.buildWrapper);
201-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
201+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
202202

203203
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
204204

@@ -234,7 +234,7 @@ public void verifyTestsRunInMatrixProject() throws Exception {
234234
MatrixProject matrixProject = jenkins.createProject(MatrixProject.class);
235235
MatlabInstallationAxis MATLABAxis = new MatlabInstallationAxis(Arrays.asList("MATLAB_PATH_1", "MATLAB_PATH_22b"));
236236
matrixProject.setAxes(new AxisList(MATLABAxis));
237-
matrixProject.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
237+
matrixProject.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
238238

239239
RunMatlabTestsBuilder testingBuilder = new RunMatlabTestsBuilder();
240240

@@ -347,7 +347,7 @@ public void verifyOnslave() throws Exception {
347347
}
348348

349349
private String addTestData() throws MalformedURLException {
350-
URL zipFile = Utilities.getRunMATLABTestsData();
350+
URL zipFile = Utilities.getURLForTestData();
351351
String path = " unzip '" + zipFile.getPath() + "'" + "\n";
352352
return path;
353353
}

src/test/java/com/mathworks/ci/systemtests/RunMatlabBuildIT.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void verifyBuildStepWithRunMatlab() throws Exception {
7979
public void verifyBuildFailureWhenMatlabBuildFails() throws Exception {
8080
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
8181
project.getBuildWrappersList().add(this.buildWrapper);
82-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
82+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
8383

8484
this.runBuilder.setTasks("invalid_task");
8585

@@ -97,7 +97,7 @@ public void verifyBuildFailureWhenMatlabBuildFails() throws Exception {
9797
public void verifyBuildPassesWhenMatlabBuildPasses() throws Exception {
9898
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
9999
project.getBuildWrappersList().add(this.buildWrapper);
100-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
100+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
101101

102102
this.runBuilder.setTasks("check");
103103
project.getBuildersList().add(this.runBuilder);
@@ -111,7 +111,7 @@ public void verifyBuildPassesWhenMatlabBuildPasses() throws Exception {
111111
public void verifyDefaultTaskForNoTaskInput() throws Exception {
112112
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
113113
project.getBuildWrappersList().add(this.buildWrapper);
114-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
114+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
115115

116116
project.getBuildersList().add(this.runBuilder);
117117
FreeStyleBuild build = project.scheduleBuild2(0).get();
@@ -126,7 +126,7 @@ public void verifyDefaultTaskForNoTaskInput() throws Exception {
126126
public void verifyRunningMultipleTasks() throws Exception {
127127
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
128128
project.getBuildWrappersList().add(this.buildWrapper);
129-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
129+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
130130

131131
this.runBuilder.setTasks("check dummy");
132132
project.getBuildersList().add(this.runBuilder);
@@ -141,7 +141,7 @@ public void verifyRunningMultipleTasks() throws Exception {
141141
public void verifySpecifyingBuildOptions() throws Exception {
142142
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
143143
project.getBuildWrappersList().add(this.buildWrapper);
144-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
144+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
145145

146146
this.runBuilder.setTasks("check test dummy");
147147
this.runBuilder.setBuildOptions(new BuildOptions("-continueOnFailure -skip check"));
@@ -193,7 +193,7 @@ public void verifyBuildSupportsEnvVar() throws Exception {
193193
public void verifyBuildSummaryInBuildStatusPage() throws Exception {
194194
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
195195
project.getBuildWrappersList().add(this.buildWrapper);
196-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
196+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
197197

198198
this.runBuilder.setTasks("check test dummy");
199199
this.runBuilder.setBuildOptions(new BuildOptions("-continueOnFailure -skip dummy"));
@@ -214,7 +214,7 @@ public void verifyBuildSummaryInBuildStatusPage() throws Exception {
214214
public void verifyHyperlinkFromSummaryAndSidePanelAreSame() throws Exception {
215215
this.buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
216216
project.getBuildWrappersList().add(this.buildWrapper);
217-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
217+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
218218

219219
this.runBuilder.setTasks("check test dummy");
220220
this.runBuilder.setBuildOptions(new BuildOptions("-continueOnFailure -skip dummy"));

src/test/java/com/mathworks/ci/systemtests/StartupOptionsIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void verifyStartupOptionsInFreeStyleProject() throws Exception {
8080
project.getBuildersList().add(commandStep);
8181

8282
//Run tests step
83-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
83+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
8484
RunMatlabTestsBuilder runTestsStep = new RunMatlabTestsBuilder();
8585
//Adding src folder
8686
List<SourceFolderPaths> list=new ArrayList<SourceFolderPaths>();
@@ -117,7 +117,7 @@ public void verifyStartupOptionsInDeclarativePipeline() throws Exception {
117117
" stage('Run MATLAB Command') {\n" +
118118
" steps\n" +
119119
" {\n" +
120-
" unzip '" + Utilities.getRunMATLABTestsData().getPath() + "'" + "\n" +
120+
" unzip '" + Utilities.getURLForTestData().getPath() + "'" + "\n" +
121121
" runMATLABCommand(command: 'pwd,version', startupOptions: '-logfile outputCommand.log -nojvm')\n" +
122122
" runMATLABTests(sourceFolder: ['src'], testResultsJUnit: 'test-results/results.xml'," +
123123
" codeCoverageCobertura: 'code-coverage/coverage.xml', startupOptions: '-logfile outputTests.log -nojvm')\n" +
@@ -140,7 +140,7 @@ public void verifyStartupOptionsInDeclarativePipeline() throws Exception {
140140
public void verifyStartupOptionsInScriptedPipeline() throws Exception {
141141
String script = "node {\n" +
142142
envScripted + "\n" +
143-
" unzip '" + Utilities.getRunMATLABTestsData().getPath() + "'" + "\n" +
143+
" unzip '" + Utilities.getURLForTestData().getPath() + "'" + "\n" +
144144
" runMATLABCommand(command: 'pwd,version', startupOptions: '-logfile outputCommand.log -nojvm')\n" +
145145
" runMATLABTests(sourceFolder: ['src'], testResultsJUnit: 'test-results/results.xml'," +
146146
" codeCoverageCobertura: 'code-coverage/coverage.xml', startupOptions: '-logfile outputTests.log -nojvm')\n" +
@@ -178,7 +178,7 @@ public void verifyStartUpOptionsInMatrixProject() throws Exception {
178178
project.getBuildersList().add(commandStep);
179179

180180
//Run tests step
181-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
181+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
182182
RunMatlabTestsBuilder runTestsStep = new RunMatlabTestsBuilder();
183183
//Adding src folder
184184
List<SourceFolderPaths> list=new ArrayList<SourceFolderPaths>();

src/test/java/com/mathworks/ci/systemtests/TestResultVisualizationIT.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void createJenkinsWebClient(){
5454
@Test
5555
public void verifyTestResultsSummary() throws Exception {
5656
FreeStyleProject project = jenkins.createFreeStyleProject();
57-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
57+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
5858

5959
UseMatlabVersionBuildWrapper buildWrapper = new UseMatlabVersionBuildWrapper();
6060
buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
@@ -86,7 +86,7 @@ public void verifyTestResultsSummary() throws Exception {
8686
@Test
8787
public void verifyHyperlinkInSummary() throws Exception {
8888
FreeStyleProject project = jenkins.createFreeStyleProject();
89-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
89+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
9090

9191
UseMatlabVersionBuildWrapper buildWrapper = new UseMatlabVersionBuildWrapper();
9292
buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
@@ -109,7 +109,7 @@ public void verifyHyperlinkInSummary() throws Exception {
109109
@Test
110110
public void verifyContentInTestResultsTable() throws Exception{
111111
FreeStyleProject project = jenkins.createFreeStyleProject();
112-
project.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
112+
project.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
113113

114114
UseMatlabVersionBuildWrapper buildWrapper = new UseMatlabVersionBuildWrapper();
115115
buildWrapper.setMatlabBuildWrapperContent(new MatlabBuildWrapperContent(Message.getValue("matlab.custom.location"), Utilities.getMatlabRoot()));
@@ -176,7 +176,7 @@ public void verifyTestResultsSummaryInMatrixProject() throws Exception {
176176
MatrixProject matrixProject = jenkins.createProject(MatrixProject.class);
177177
MatlabInstallationAxis MATLABAxis = new MatlabInstallationAxis(Arrays.asList("MATLAB_PATH_1", "MATLAB_PATH_22b"));
178178
matrixProject.setAxes(new AxisList(MATLABAxis));
179-
matrixProject.setScm(new ExtractResourceSCM(Utilities.getRunMATLABTestsData()));
179+
matrixProject.setScm(new ExtractResourceSCM(Utilities.getURLForTestData()));
180180

181181
// Run tests through Run Build step
182182
RunMatlabBuildBuilder buildtoolBuilder = new RunMatlabBuildBuilder();
@@ -326,7 +326,7 @@ private List<String[]> getTestsInfoForATestFile(String testFileName, FreeStyleBu
326326
}
327327

328328
private String addTestData() throws MalformedURLException {
329-
URL zipFile = Utilities.getRunMATLABTestsData();
329+
URL zipFile = Utilities.getURLForTestData();
330330
String path = " unzip '" + zipFile.getPath() + "'" + "\n";
331331
return path;
332332
}

src/test/java/com/mathworks/ci/systemtests/Utilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static MatlabInstallation[] getMatlabInstallation(){
7070
return MatlabInstallation.getAll();
7171
}
7272

73-
public static URL getRunMATLABTestsData() throws MalformedURLException {
73+
public static URL getURLForTestData() throws MalformedURLException {
7474
File file = new File(System.getProperty("user.dir") + File.separator +"src" + File.separator + "test" + File.separator + "resources" + File.separator + "TestData" + File.separator + "FilterTestData.zip");
7575
return file.toURI().toURL();
7676
}

0 commit comments

Comments
 (0)