Skip to content

Commit

Permalink
add tags to failed init descriptors too
Browse files Browse the repository at this point in the history
  • Loading branch information
giurim committed May 11, 2022
1 parent a1e2b7f commit f4a979c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public abstract class ScalatestDescriptor implements TestDescriptor {
private final UniqueId id;
private TestDescriptor parentDescriptor = null;
private Set<TestDescriptor> childDescriptors = new HashSet<TestDescriptor>();
protected Set<TestTag> tags = new HashSet<>();

protected ScalatestDescriptor(UniqueId id) {
this.id = id;
Expand Down Expand Up @@ -75,7 +76,7 @@ public Set<TestDescriptor> getChildren() {

@Override
public Set<TestTag> getTags() {
return new HashSet<>();
return tags;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
package co.helmethair.scalatest.descriptor;

import org.junit.platform.engine.TestSource;
import org.junit.platform.engine.TestTag;
import org.junit.platform.engine.support.descriptor.MethodSource;

import java.util.Optional;
import java.util.Set;

public class ScalatestFailedInitDescriptor extends ScalatestDescriptor {
private final Throwable cause;
private final String suiteId;

public ScalatestFailedInitDescriptor(Throwable cause, String name) {
public ScalatestFailedInitDescriptor(Throwable cause, String name, Set<TestTag> tags) {
super(ENGINE_ID.append("failed", name));
this.cause = cause;
this.suiteId = name;
this.tags = tags;
}

@Override
Expand Down

0 comments on commit f4a979c

Please sign in to comment.