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

Commit 89a4b9f

Browse files
committed
Adjusted formatting
1 parent 0d7b015 commit 89a4b9f

File tree

3 files changed

+69
-66
lines changed

3 files changed

+69
-66
lines changed

src/main/java/com/mathworks/ci/RunMatlabTestsBuilder.java

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,16 @@ private String getInputArguments() {
335335
.collect(Collectors.toList())));
336336
}
337337

338-
//Add Test folders
339-
if(getSelectbyFolder() != null && !getSelectbyFolder().getTestFolderPaths().isEmpty()) {
340-
getSelectbyFolder().addSourceToInputArgs(inputArgsList, Utilities.getCellArrayFrmList(getSelectbyFolder().getTestFolderPaths().stream()
341-
.map(TestFolders::getTestFolders)
342-
.collect(Collectors.toList())));
338+
// Add Test folders
339+
if (getSelectbyFolder() != null && !getSelectbyFolder().getTestFolderPaths().isEmpty()) {
340+
getSelectbyFolder().addSourceToInputArgs(inputArgsList,
341+
Utilities.getCellArrayFrmList(getSelectbyFolder().getTestFolderPaths().stream()
342+
.map(TestFolders::getTestFolders).collect(Collectors.toList())));
343343
}
344-
345-
//Add Tag to arguments
346-
if(getSelectByTag() != null && !getSelectByTag().getTestTag().isEmpty()) {
347-
getSelectByTag().addTagToInputArgs(inputArgsList);
344+
345+
// Add Tag to arguments
346+
if (getSelectByTag() != null && !getSelectByTag().getTestTag().isEmpty()) {
347+
getSelectByTag().addTagToInputArgs(inputArgsList);
348348
}
349349

350350
return String.join(",", inputArgsList);
@@ -502,23 +502,26 @@ public interface Artifact {
502502
}
503503

504504
public static final class SelectByTag extends AbstractDescribableImpl<SelectByTag> {
505-
private String testTag;
506-
private static final String SELECT_BY_TAG = "SelectByTag";
507-
508-
@DataBoundConstructor
509-
public SelectByTag(String testTag) {
510-
this.testTag = Util.fixNull(testTag);
511-
}
512-
513-
public String getTestTag() {
514-
return this.testTag;
515-
}
516-
517-
public void addTagToInputArgs(List<String> inputArgsList) {
518-
// Concatenate all source folders to MATLAB cell array string.
519-
inputArgsList.add("'" + SELECT_BY_TAG + "'" + "," + "'" + getTestTag().replaceAll("'", "''") + "'");
520-
}
521-
522-
@Extension public static class DescriptorImpl extends Descriptor<SelectByTag> {}
505+
private String testTag;
506+
private static final String SELECT_BY_TAG = "SelectByTag";
507+
508+
@DataBoundConstructor
509+
public SelectByTag(String testTag) {
510+
this.testTag = Util.fixNull(testTag);
511+
}
512+
513+
public String getTestTag() {
514+
return this.testTag;
515+
}
516+
517+
public void addTagToInputArgs(List<String> inputArgsList) {
518+
// Concatenate all source folders to MATLAB cell array string.
519+
inputArgsList.add("'" + SELECT_BY_TAG + "'" + "," + "'"
520+
+ getTestTag().replaceAll("'", "''") + "'");
521+
}
522+
523+
@Extension
524+
public static class DescriptorImpl extends Descriptor<SelectByTag> {
525+
}
523526
}
524527
}

src/main/java/com/mathworks/ci/SelectByFolder.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,28 @@
1111
import hudson.model.Descriptor;
1212

1313
public class SelectByFolder extends AbstractDescribableImpl<SelectByFolder> {
14-
private List<TestFolders> testFolderPaths;
15-
private static final String SELECT_BY_FOLDER = "SelectByFolder";
16-
17-
@DataBoundConstructor
18-
public SelectByFolder(List<TestFolders> testFolderPaths) {
19-
this.testFolderPaths = Util.fixNull(testFolderPaths);
20-
}
21-
22-
public List<TestFolders> getTestFolderPaths() {
23-
return this.testFolderPaths;
24-
}
25-
26-
public void addSourceToInputArgs(List<String> inputArgsList, String cellArraySourceVal) {
27-
// Concatenate all source folders to MATLAB cell array string.
28-
inputArgsList.add("'" + SELECT_BY_FOLDER + "'" + "," + cellArraySourceVal);
29-
}
30-
31-
@Extension
32-
public static class DescriptorImpl extends Descriptor<SelectByFolder> {
33-
@Override
34-
public String getDisplayName() {
35-
return "";
36-
}
37-
}
14+
private List<TestFolders> testFolderPaths;
15+
private static final String SELECT_BY_FOLDER = "SelectByFolder";
16+
17+
@DataBoundConstructor
18+
public SelectByFolder(List<TestFolders> testFolderPaths) {
19+
this.testFolderPaths = Util.fixNull(testFolderPaths);
20+
}
21+
22+
public List<TestFolders> getTestFolderPaths() {
23+
return this.testFolderPaths;
24+
}
25+
26+
public void addSourceToInputArgs(List<String> inputArgsList, String cellArraySourceVal) {
27+
// Concatenate all source folders to MATLAB cell array string.
28+
inputArgsList.add("'" + SELECT_BY_FOLDER + "'" + "," + cellArraySourceVal);
29+
}
30+
31+
@Extension
32+
public static class DescriptorImpl extends Descriptor<SelectByFolder> {
33+
@Override
34+
public String getDisplayName() {
35+
return "";
36+
}
37+
}
3838
}

src/main/java/com/mathworks/ci/TestFolders.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88

99
public class TestFolders extends AbstractDescribableImpl<TestFolders> {
1010

11-
private String testFolders;
11+
private String testFolders;
1212

13-
@DataBoundConstructor
14-
public TestFolders(String testFolders) {
15-
this.testFolders = testFolders;
16-
}
13+
@DataBoundConstructor
14+
public TestFolders(String testFolders) {
15+
this.testFolders = testFolders;
16+
}
1717

18-
public String getTestFolders() {
19-
return this.testFolders;
20-
}
18+
public String getTestFolders() {
19+
return this.testFolders;
20+
}
2121

22-
@Extension
23-
public static final class DescriptorImpl extends Descriptor<TestFolders> {
22+
@Extension
23+
public static final class DescriptorImpl extends Descriptor<TestFolders> {
2424

25-
@Override
26-
public String getDisplayName() {
27-
return "";
28-
}
29-
}
25+
@Override
26+
public String getDisplayName() {
27+
return "";
28+
}
29+
}
3030
}

0 commit comments

Comments
 (0)