Package org.approvej.spring
Record Class DirtiesContextUsage
java.lang.Object
java.lang.Record
org.approvej.spring.DirtiesContextUsage
- Record Components:
testClass- the test class the annotation applies totestMethod- the test method the annotation applies to, ornullif it applies to the whole test classannotation- theDirtiesContextannotation
@NullMarked
public record DirtiesContextUsage(Class<?> testClass, @Nullable Method testMethod, org.springframework.test.annotation.DirtiesContext annotation)
extends Record
A usage of
DirtiesContext that causes a Spring test application context to be closed and
started again.-
Constructor Summary
ConstructorsConstructorDescriptionDirtiesContextUsage(Class<?> testClass, @Nullable Method testMethod, org.springframework.test.annotation.DirtiesContext annotation) Creates an instance of aDirtiesContextUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.test.annotation.DirtiesContextReturns the value of theannotationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Class<?> Returns the value of thetestClassrecord component.@Nullable MethodReturns the value of thetestMethodrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DirtiesContextUsage
public DirtiesContextUsage(Class<?> testClass, @Nullable Method testMethod, org.springframework.test.annotation.DirtiesContext annotation) Creates an instance of aDirtiesContextUsagerecord class.- Parameters:
testClass- the value for thetestClassrecord componenttestMethod- the value for thetestMethodrecord componentannotation- the value for theannotationrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
testClass
Returns the value of thetestClassrecord component.- Returns:
- the value of the
testClassrecord component
-
testMethod
Returns the value of thetestMethodrecord component.- Returns:
- the value of the
testMethodrecord component
-
annotation
public org.springframework.test.annotation.DirtiesContext annotation()Returns the value of theannotationrecord component.- Returns:
- the value of the
annotationrecord component
-