Skip to content

Commit 1cec2fb

Browse files
committed
Pull up executionOrder property into SpecElementInfo
Both SpecInfo and FeatureInfo had identical executionOrder bean properties, declared redundantly. Therefore, I pulled them up into the base class. Relates to #1443.
1 parent a64c528 commit 1cec2fb

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

spock-core/src/main/java/org/spockframework/runtime/model/FeatureInfo.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515
public class FeatureInfo extends SpecElementInfo<SpecInfo, AnnotatedElement> implements ITestTaggable {
1616
private int declarationOrder; // per spec class
17-
private int executionOrder; // per spec inheritance chain
1817

1918
private final List<String> parameterNames = new ArrayList<>();
2019
private final List<String> dataVariables = new ArrayList<>();
@@ -59,14 +58,6 @@ public void setDeclarationOrder(int declarationOrder) {
5958
this.declarationOrder = declarationOrder;
6059
}
6160

62-
public int getExecutionOrder() {
63-
return executionOrder;
64-
}
65-
66-
public void setExecutionOrder(int executionOrder) {
67-
this.executionOrder = executionOrder;
68-
}
69-
7061
public List<String> getParameterNames() {
7162
return parameterNames;
7263
}

spock-core/src/main/java/org/spockframework/runtime/model/SpecElementInfo.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ public abstract class SpecElementInfo<P extends NodeInfo, R extends AnnotatedEle
3131
private String displayName;
3232

3333
private boolean excluded = false;
34+
private int executionOrder;
3435
private final List<Tag> tags = new ArrayList<>();
3536
private final List<Attachment> attachments = new ArrayList<>();
3637
private final List<IMethodInterceptor> interceptors = new ArrayList<>();
38+
3739
@Override
3840
public boolean isSkipped() {
3941
return skipped;
@@ -75,6 +77,14 @@ public void setExcluded(boolean excluded) {
7577
this.excluded = excluded;
7678
}
7779

80+
public int getExecutionOrder() {
81+
return executionOrder;
82+
}
83+
84+
public void setExecutionOrder(int executionOrder) {
85+
this.executionOrder = executionOrder;
86+
}
87+
7888
@Override
7989
public List<Tag> getTags() {
8090
return tags;

spock-core/src/main/java/org/spockframework/runtime/model/SpecInfo.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public class SpecInfo extends SpecElementInfo<NodeInfo, Class<?>> implements IMe
4848
private ExecutionMode executionMode = null;
4949
private ExecutionMode childExecutionMode = null;
5050

51-
private int executionOrder;
52-
5351
private String pkg;
5452
private String filename;
5553
private String narrative;
@@ -68,14 +66,6 @@ public class SpecInfo extends SpecElementInfo<NodeInfo, Class<?>> implements IMe
6866

6967
private final List<FeatureInfo> features = new ArrayList<>();
7068

71-
public int getExecutionOrder() {
72-
return executionOrder;
73-
}
74-
75-
public void setExecutionOrder(int executionOrder) {
76-
this.executionOrder = executionOrder;
77-
}
78-
7969
public String getPackage() {
8070
return pkg;
8171
}

0 commit comments

Comments
 (0)