CustomSubjectBuilder
.@Deprecated public abstract class AbstractDelegatedVerb extends Object
that()
methods for the
Truth SPI. Intended for advanced usage only, generally you should prefer to create a SubjectFactory
when extending Truth.
This class has no abstract methods because it's intended to be extended only when unique
generics are required on the that()
method. Regardless, any subclass should define at
least one that()
method which accepts a single argument and returns a Subject
, to
be consistent with the Truth SPI.
Every subclass of AbstractDelegatedVerb
should also have a companion DelegatedVerbFactory
which knows how to instantiate it. The factory should pass the FailureStrategy
it receives, along with itself (this
) into the constructor for the
AbstractDelegatedVerb
.
For an example implementation and usage, see DelegatedVerbFactoryTest
.
Copyright © 2017. All rights reserved.