Builds RouteData.
More...
|
static TBuilder | Create () |
| Returns a new instance of the builder.
|
static TSubject | BuildDefault () |
| Builds the default output artifact.
|
TBuilder | With (Action< TSubject > action, string identifier) |
| Adds an identified mutator for the artifact - if a mutator with the same identity already exists, it will be removed.
|
TBuilder | With< TCast > (Action< TCast > action) |
| Adds a mutator for the artifact, cast to TCast.
|
TBuilder | With< TCast > (Action< TCast > action, string identifier) |
| Adds an identified mutator for the artifact, cast to TCast.
|
TBuilder | WithRandomTimes (Action< TSubject > action) |
| Applies the given mutator a random (1-4) number of times.
|
TBuilder | WithRandomTimes< TCast > (Action< TCast > action) |
| Applies the given mutator on a cast item a random (1-4) number of times.
|
virtual TSubject | ConstructEntity () |
| Override in a derivative builder to provide a custom implementation for TSubject.
|
TBuilder | WithPreCursor (Action toRun) |
| Run a precursor before your entity is constructed - use when your entity requires constructor parameters you'd like to make user-tweakable via builder methods.
|
TBuilder | WithPostBuild (Action< TSubject > action) |
| Add post-build actions.
|
static void | WarnIf (bool condition, string message) |
| Print a traced warning if the condition is found to be false.
|
static void | ErrorIf (bool condition, string message) |
| Print a traced warning if the condition is found to be false.
|
TSubject | CurrentEntity |
| During build, CurrentEntity will be set to the currently-building entity. You may implement actualizer(s) in your derivative to pull this value in lazily to consumers.
|
Action< T > | Action [get] |
string | Identifier [get] |
◆ WithDataToken()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithDataToken |
( |
string | key, |
|
|
string | value ) |
Sets a data token.
- Parameters
-
- Returns
◆ WithNoDataTokens()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithNoDataTokens |
( |
| ) |
|
Removes all data tokens.
- Returns
◆ WithNoRouters()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithNoRouters |
( |
| ) |
|
Clears all routers.
- Returns
◆ WithNoRouteValues()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithNoRouteValues |
( |
| ) |
|
Clears out any existing route values.
- Returns
◆ WithRouter()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithRouter |
( |
IRouter | router | ) |
|
Adds a router.
- Parameters
-
- Returns
◆ WithRouteValue()
RouteDataBuilder PeanutButter.TestUtils.AspNetCore.Builders.RouteDataBuilder.WithRouteValue |
( |
string | key, |
|
|
string | value ) |
Sets a route value.
- Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.AspNetCore/Builders/RouteDataBuilder.cs