Record Class ArchitectureTestCase
java.lang.Object
java.lang.Record
dev.archunitjava.junit.ArchitectureTestCase
- All Implemented Interfaces:
Comparable<ArchitectureTestCase>
public record ArchitectureTestCase(String semanticIdentity, String displayName, Runnable executable)
extends Record
implements Comparable<ArchitectureTestCase>
Framework-neutral executable case that can be adapted to a JUnit Jupiter DynamicTest.
-
Constructor Summary
ConstructorsConstructorDescriptionArchitectureTestCase(String semanticIdentity, String displayName, Runnable executable) Creates an instance of aArchitectureTestCaserecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ArchitectureTestCase other) Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutablerecord component.voidexecute()final inthashCode()Returns a hash code value for this object.Returns the value of thesemanticIdentityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArchitectureTestCase
Creates an instance of aArchitectureTestCaserecord class.- Parameters:
semanticIdentity- the value for thesemanticIdentityrecord componentdisplayName- the value for thedisplayNamerecord componentexecutable- the value for theexecutablerecord component
-
-
Method Details
-
execute
public void execute() -
compareTo
- Specified by:
compareToin interfaceComparable<ArchitectureTestCase>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
semanticIdentity
Returns the value of thesemanticIdentityrecord component.- Returns:
- the value of the
semanticIdentityrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
executable
Returns the value of theexecutablerecord component.- Returns:
- the value of the
executablerecord component
-