| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
package org.junit.jupiter.api; |
| 12 |
|
| 13 |
import static org.apiguardian.api.API.Status.MAINTAINED; |
| 14 |
|
| 15 |
import java.net.URI; |
| 16 |
import java.util.Optional; |
| 17 |
|
| 18 |
import org.apiguardian.api.API; |
| 19 |
import org.junit.platform.commons.util.Preconditions; |
| 20 |
import org.junit.platform.commons.util.ToStringBuilder; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
@API(status = MAINTAINED, since = "5.3") |
| 31 |
public abstract class DynamicNode { |
| 32 |
|
| 33 |
private final String displayName; |
| 34 |
|
| 35 |
|
| 36 |
private final URI testSourceUri; |
| 37 |
|
| 38 |
DynamicNode(String displayName, URI testSourceUri) { |
| 39 |
this.displayName = Preconditions.notBlank(displayName, "displayName must not be null or blank"); |
| 40 |
this.testSourceUri = testSourceUri; |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
public String getDisplayName() { |
| 49 |
return this.displayName; |
| 50 |
} |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
public Optional<URI> getTestSourceUri() { |
| 60 |
return Optional.ofNullable(testSourceUri); |
| 61 |
} |
| 62 |
|
| 63 |
@Override |
| 64 |
public String toString() { |
| 65 |
return new ToStringBuilder(this) |
| 66 |
.append("displayName", displayName) |
| 67 |
.append("testSourceUri", testSourceUri) |
| 68 |
.toString(); |
| 69 |
} |
| 70 |
|
| 71 |
} |