T - The type of the DTO.public static interface DtoTester.Builder<T>
| Modifier and Type | Method and Description |
|---|---|
default <R> @NotNull DtoTester.Builder<T> |
addMutator(@NotNull DtoTester.MutatorType mutatorType,
@NotNull String mutatorName,
@NotNull BiConsumer<? super T,? super R> setter,
R value)
Adds a mutator to the builder for testing, with a specified value.
|
<R> @NotNull DtoTester.Builder<T> |
addMutator(@NotNull DtoTester.MutatorType type,
@NotNull String mutatorName,
@NotNull Consumer<? super T> mutator)
Adds a mutator to the builder for testing.
|
DtoTester |
build()
Builds the DtoTester instance.
|
<R> @NotNull DtoTester.Builder<T> |
withAccessors(@NotNull Function<? super T,? extends R> getter,
@NotNull BiConsumer<? super T,? super R> setter)
Adds accessors to the builder for testing.
|
@NotNull DtoTester.Builder<T> |
withResetter(@NotNull Consumer<? super T> resetter)
Adds a resetter function to the builder.
|
@NotNull DtoTester.Builder<T> |
withValidator(@NotNull Consumer<? super T> validator)
Adds a validation function to the builder.
|
@NotNull <R> @NotNull DtoTester.Builder<T> withAccessors(@NotNull @NotNull Function<? super T,? extends R> getter, @NotNull @NotNull BiConsumer<? super T,? super R> setter)
getter - The getter function.setter - The setter function.@NotNull @NotNull DtoTester.Builder<T> withResetter(@NotNull @NotNull Consumer<? super T> resetter)
resetter - The reset function.@NotNull @NotNull DtoTester.Builder<T> withValidator(@NotNull @NotNull Consumer<? super T> validator)
validator - The validation function.@NotNull <R> @NotNull DtoTester.Builder<T> addMutator(@NotNull @NotNull DtoTester.MutatorType type, @NotNull @NotNull String mutatorName, @NotNull @NotNull Consumer<? super T> mutator)
type - The type of the mutator (MANDATORY/OPTIONAL).mutatorName - The name of the mutator.mutator - The mutation function.@NotNull default <R> @NotNull DtoTester.Builder<T> addMutator(@NotNull @NotNull DtoTester.MutatorType mutatorType, @NotNull @NotNull String mutatorName, @NotNull @NotNull BiConsumer<? super T,? super R> setter, @Nullable R value)
mutatorType - The type of the mutator (MANDATORY/OPTIONAL).mutatorName - The name of the mutator.setter - The setter function.value - The value to set.DtoTester build()
Copyright © 2024. All rights reserved.