Package spoon.testing
Class AbstractAssert<T extends AbstractAssert<T,A>,A>
- java.lang.Object
-
- spoon.testing.AbstractAssert<T,A>
-
- Type Parameters:
T
- the self type of this assertion class.A
- the type of the actual value.
- Direct Known Subclasses:
AbstractCtElementAssert
,AbstractCtPackageAssert
,AbstractFileAssert
public abstract class AbstractAssert<T extends AbstractAssert<T,A>,A> extends Object
Base contract for all assertion objects: the minimum functionality that any assertion object should provide.
-
-
Field Summary
Fields Modifier and Type Field Description protected A
actual
protected T
myself
protected LinkedList<Processor<?>>
processors
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAssert(A actual, Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
hashCode()
T
withProcessor(Class<? extends Processor<?>> processor)
Applies the processor on the actual value.T
withProcessor(String qualifiedName)
Applies the processor on the actual value.T
withProcessor(Processor<?> processor)
Applies the processor on the actual value.
-
-
-
Field Detail
-
processors
protected final LinkedList<Processor<?>> processors
-
actual
protected final A actual
-
myself
protected final T extends AbstractAssert<T,A> myself
-
-
Method Detail
-
withProcessor
public T withProcessor(Processor<?> processor)
Applies the processor on the actual value.- Parameters:
processor
- the given processor.- Returns:
this
assertion object.
-
withProcessor
public T withProcessor(Class<? extends Processor<?>> processor)
Applies the processor on the actual value.- Parameters:
processor
- the class of the given processor.- Returns:
this
assertion object.
-
withProcessor
public T withProcessor(String qualifiedName)
Applies the processor on the actual value.- Parameters:
qualifiedName
- the qualified name of the given processor.- Returns:
this
assertion object.
-
-