public abstract class CustomSubjectBuilder extends Object
that methods, which accept a
value under test and return a Subject.
(Note that the "custom" that methods are not defined on CustomSubjectBuilder
itself, only on its subtypes, which are the types users actually interact with.)
TODO(cpovirk): Link to a doc about the full assertion chain.
TODO(cpovirk): Link to a doc about custom subjects.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CustomSubjectBuilder.Factory<CustomSubjectBuilderT extends CustomSubjectBuilder>
|
| Modifier | Constructor and Description |
|---|---|
protected |
CustomSubjectBuilder(FailureMetadata metadata)
Constructor for use by subclasses.
|
protected |
CustomSubjectBuilder(FailureStrategy failureStrategy)
Deprecated.
When you switch from
CustomSubjectBuilderFactory to CustomSubjectBuilder.Factory, you'll switch to using the other constructor, which accepts
a FailureMetadata instead of a FailureStrategy. |
| Modifier and Type | Method and Description |
|---|---|
protected FailureStrategy |
failureStrategy()
Deprecated.
When you switch your
Subject implementations from accepting a FailureStrategy to accepting a FailureMetadata, you'll switch from calling this
method to calling metadata. |
protected FailureMetadata |
metadata()
|
@Deprecated protected CustomSubjectBuilder(FailureStrategy failureStrategy)
CustomSubjectBuilderFactory to CustomSubjectBuilder.Factory, you'll switch to using the other constructor, which accepts
a FailureMetadata instead of a FailureStrategy.protected CustomSubjectBuilder(FailureMetadata metadata)
@Deprecated protected final FailureStrategy failureStrategy()
Subject implementations from accepting a FailureStrategy to accepting a FailureMetadata, you'll switch from calling this
method to calling metadata.protected final FailureMetadata metadata()
Copyright © 2017. All rights reserved.