Package com.google.common.truth
Class CustomSubjectBuilder
- java.lang.Object
-
- com.google.common.truth.CustomSubjectBuilder
-
- Direct Known Subclasses:
ProtoSubjectBuilder
public abstract class CustomSubjectBuilder extends Object
In a fluent assertion chain, exposes one or more "custom"that
methods, which accept a value under test and return aSubject
.(Note that the "custom"
that
methods are not defined onCustomSubjectBuilder
itself, only on its subtypes, which are the types users actually interact with.)For more information about the methods in this class, see this FAQ entry.
For people extending Truth
When you write a custom subject, see our doc on extensions. It explains the cases in which
CustomSubjectBuilder
is necessary, and it links to further instructions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CustomSubjectBuilder.Factory<CustomSubjectBuilderT extends CustomSubjectBuilder>
-
Constructor Summary
Constructors Modifier Constructor Description protected
CustomSubjectBuilder(FailureMetadata metadata)
Constructor for use by subclasses.
-
-
-
Constructor Detail
-
CustomSubjectBuilder
protected CustomSubjectBuilder(FailureMetadata metadata)
Constructor for use by subclasses.
-
-
Method Detail
-
metadata
protected final FailureMetadata metadata()
-
-