|
PeanutButter
|
Provides the base builder for AspNetCore fakes. More...
Public Member Functions | |
| TBuilder | With (Action< TSubject > action) |
| Adds a mutator for the artifact. | |
| virtual TSubject | Build () |
| Builds the subject artifact. | |
| Mutator (Action< T > action, string identifier) | |
Static Public Member Functions | |
| static TBuilder | Create () |
| Returns a new instance of the builder. | |
| static TSubject | BuildDefault () |
| Builds the default output artifact. | |
Protected Member Functions | |
| 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 Protected Member Functions | |
| 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. | |
Properties | |
| Action< T > | Action [get] |
| string | Identifier [get] |
Provides the base builder for AspNetCore fakes.
| TBuilder | |
| TSubject |
| TBuilder | : | Builder | |
| TBuilder | : | TBuilder | |
| TBuilder | : | TSubject | |
| TBuilder | : | new() |
|
virtual |
Builds the subject artifact.
|
static |
Builds the default output artifact.
|
protectedvirtual |
Override in a derivative builder to provide a custom implementation for TSubject.
| CustomConstructEntityRequired |
Reimplemented in PeanutButter.TestUtils.AspNetCore.Builders.ActionContextBuilder, PeanutButter.TestUtils.AspNetCore.Builders.ActionExecutedContextBuilder, PeanutButter.TestUtils.AspNetCore.Builders.ActionExecutingContextBuilder, PeanutButter.TestUtils.AspNetCore.Builders.AuthorizationFilterContextBuilder< TController >, PeanutButter.TestUtils.AspNetCore.Builders.ControllerBuilder< TController >, PeanutButter.TestUtils.AspNetCore.Builders.FormBuilder, PeanutButter.TestUtils.AspNetCore.Builders.FormFileBuilder, PeanutButter.TestUtils.AspNetCore.Builders.HttpContextBuilder, PeanutButter.TestUtils.AspNetCore.Builders.HttpRequestBuilder, PeanutButter.TestUtils.AspNetCore.Builders.HttpResponseBuilder, PeanutButter.TestUtils.AspNetCore.Builders.ModelBindingContextBuilder, PeanutButter.TestUtils.AspNetCore.Builders.ModelMetadataBuilder< TModel >, PeanutButter.TestUtils.AspNetCore.Builders.RequestCookieCollectionBuilder, PeanutButter.TestUtils.AspNetCore.Builders.StringMapDerivativeBuilder< TBuilder, TInterface, TConcrete >, PeanutButter.TestUtils.AspNetCore.Builders.ViewDataDictionaryBuilder, PeanutButter.TestUtils.AspNetCore.Builders.WebSocketBuilder, and PeanutButter.TestUtils.AspNetCore.Builders.WebSocketManagerBuilder.
|
static |
Returns a new instance of the builder.
|
staticprotected |
Print a traced warning if the condition is found to be false.
| condition | |
| message |
|
staticprotected |
Print a traced warning if the condition is found to be false.
| condition | |
| message |
| TBuilder PeanutButter.TestUtils.AspNetCore.Builders.Builder< TBuilder, TSubject >.With | ( | Action< TSubject > | action | ) |
Adds a mutator for the artifact.
| action |
|
protected |
Adds an identified mutator for the artifact - if a mutator with the same identity already exists, it will be removed.
| action | |
| identifier |
|
protected |
Adds a mutator for the artifact, cast to TCast.
| action |
| TCast |
| TCast | : | TSubject |
|
protected |
Adds an identified mutator for the artifact, cast to TCast.
| action | |
| identifier |
| TCast |
| TCast | : | TSubject |
|
protected |
Add post-build actions.
| action |
|
protected |
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.
| toRun |
|
protected |
Applies the given mutator a random (1-4) number of times.
| action |
|
protected |
Applies the given mutator on a cast item a random (1-4) number of times.
| action |
| TCast |
| TCast | : | TSubject |