Search in sources :

Example 21 with TestDescriptorStub

use of org.junit.platform.fakes.TestDescriptorStub in project junit5 by junit-team.

the class SummaryGenerationTests method createTestIdentifier.

private TestIdentifier createTestIdentifier(String uniqueId) {
    var identifier = TestIdentifier.from(new TestDescriptorStub(UniqueId.root("test", uniqueId), uniqueId));
    testPlan.addInternal(identifier);
    return identifier;
}
Also used : TestDescriptorStub(org.junit.platform.fakes.TestDescriptorStub)

Example 22 with TestDescriptorStub

use of org.junit.platform.fakes.TestDescriptorStub in project junit5 by junit-team.

the class TestDescriptorTests method isRootWithParent.

@Test
void isRootWithParent() {
    TestDescriptor child = new TestDescriptorStub(UniqueId.root("child", "child"), "child");
    child.setParent(new TestDescriptorStub(UniqueId.root("root", "root"), "root"));
    assertFalse(child.isRoot());
}
Also used : TestDescriptorStub(org.junit.platform.fakes.TestDescriptorStub) Test(org.junit.jupiter.api.Test)

Aggregations

TestDescriptorStub (org.junit.platform.fakes.TestDescriptorStub)22 Test (org.junit.jupiter.api.Test)19 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 EngineDescriptor (org.junit.platform.engine.support.descriptor.EngineDescriptor)6 TestDescriptor (org.junit.platform.engine.TestDescriptor)5 TestEngineSpy (org.junit.platform.fakes.TestEngineSpy)3 StringWriter (java.io.StringWriter)2 RepeatedTest (org.junit.jupiter.api.RepeatedTest)2 EngineDiscoveryRequest (org.junit.platform.engine.EngineDiscoveryRequest)2 ExecutionRequest (org.junit.platform.engine.ExecutionRequest)2 TestEngine (org.junit.platform.engine.TestEngine)2 UniqueId (org.junit.platform.engine.UniqueId)2 DiscoverySelectors.selectUniqueId (org.junit.platform.engine.discovery.DiscoverySelectors.selectUniqueId)2 AbstractTestDescriptor (org.junit.platform.engine.support.descriptor.AbstractTestDescriptor)2 DemoHierarchicalTestEngine (org.junit.platform.engine.support.hierarchical.DemoHierarchicalTestEngine)2 PrintWriter (java.io.PrintWriter)1 Writer (java.io.Writer)1 LinkedHashMap (java.util.LinkedHashMap)1 Optional (java.util.Optional)1 Level (java.util.logging.Level)1