Debian Codegraph @

junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineStub.java

raw
1 /*
2 * Copyright 2015-2024 the original author or authors.
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v2.0 which
6 * accompanies this distribution and is available at
7 *
8 * https://www.eclipse.org/legal/epl-v20.html
9 */
10
11 package org.junit.platform.fakes;
12
13 import org.junit.platform.engine.EngineDiscoveryRequest;
14 import org.junit.platform.engine.ExecutionRequest;
15 import org.junit.platform.engine.TestDescriptor;
16 import org.junit.platform.engine.TestEngine;
17 import org.junit.platform.engine.UniqueId;
18
19 /**
20 * @since 1.4
21 */
22 public class TestEngineStub implements TestEngine {
23
24 private final String id;
25
26 public TestEngineStub() {
27 this(TestEngineStub.class.getSimpleName());
28 }
29
30 public TestEngineStub(String id) {
31 this.id = id;
32 }
33
34 @Override
35 public String getId() {
36 return this.id;
37 }
38
39 @Override
40 public TestDescriptor discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId) {
41 return new TestDescriptorStub(UniqueId.forEngine(getId()), getId());
42 }
43
44 @Override
45 public void execute(ExecutionRequest request) {
46 }
47
48 }