Class JmcMethodTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.mpi_sws.jmc.integrations.junit5.descriptors.JmcMethodTestDescriptor
- All Implemented Interfaces:
org.junit.platform.engine.TestDescriptor,JmcExecutableTestDescriptor
public class JmcMethodTestDescriptor
extends org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
implements JmcExecutableTestDescriptor
A JUnit 5 test descriptor for a JMC method test.
This descriptor represents a single test method annotated with JMC annotations, allowing for the execution of JMC checks as part of the test lifecycle.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
org.junit.platform.engine.TestDescriptor.Type, org.junit.platform.engine.TestDescriptor.Visitor -
Field Summary
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getAncestors, getDescendants, getLegacyReportingName, isContainer, isRoot, isTest, mayRegisterTests, prune
-
Constructor Details
-
JmcMethodTestDescriptor
-
-
Method Details
-
getType
public org.junit.platform.engine.TestDescriptor.Type getType()- Specified by:
getTypein interfaceorg.junit.platform.engine.TestDescriptor
-
execute
Executes the JMC test method.This method creates an instance of the test class, configures the JMC checker based on annotations, and executes the test method using the JMC Model Checker.
Execution can be either running the model checker or replaying a previous execution and depends on the annotation provided for the test method. If the method is annotated with
JmcReplay, it will replay the test method instead of executing it.- Specified by:
executein interfaceJmcExecutableTestDescriptor- Throws:
JmcCheckerException- If an error occurs during execution or configuration.
-