Interface IDbContextTestBuilder
Used for testing Microsoft.EntityFrameworkCore.DbContext.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Data
Assembly:MyTested.AspNetCore.Mvc.EntityFrameworkCore.dll
Syntax
public interface IDbContextTestBuilder
Methods
|
Improve this Doc
View Source
WithEntities(Action<DbContext>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entities pass the given assertions.
Declaration
IAndDbContextTestBuilder WithEntities(Action<DbContext> assertions)
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbContext> |
assertions |
Action containing all assertions on the Microsoft.EntityFrameworkCore.DbContext entities.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
The same IDbContextTestBuilder.
|
|
Improve this Doc
View Source
WithEntities(Func<DbContext, Boolean>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entities pass the given predicate.
Declaration
IAndDbContextTestBuilder WithEntities(Func<DbContext, bool> predicate)
Parameters
Type |
Name |
Description |
System.Func<Microsoft.EntityFrameworkCore.DbContext, System.Boolean> |
predicate |
Predicate testing the Microsoft.EntityFrameworkCore.DbContext entities.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
The same IDbContextTestBuilder.
|
|
Improve this Doc
View Source
WithEntities<TDbContext>(Action<TDbContext>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entities pass the given assertions.
Declaration
IAndDbContextTestBuilder WithEntities<TDbContext>(Action<TDbContext> assertions)where TDbContext : DbContext
Parameters
Type |
Name |
Description |
System.Action<TDbContext> |
assertions |
Action containing all assertions on the Microsoft.EntityFrameworkCore.DbContext entities.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext. |
|
Improve this Doc
View Source
WithEntities<TDbContext>(Func<TDbContext, Boolean>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entities pass the given predicate.
Declaration
IAndDbContextTestBuilder WithEntities<TDbContext>(Func<TDbContext, bool> predicate)where TDbContext : DbContext
Parameters
Type |
Name |
Description |
System.Func<TDbContext, System.Boolean> |
predicate |
Predicate testing the Microsoft.EntityFrameworkCore.DbContext entities.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext. |
|
Improve this Doc
View Source
WithSet<TEntity>(Action<DbSet<TEntity>>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entity Microsoft.EntityFrameworkCore.DbSet`1 passes the given assertions.
Declaration
IAndDbContextTestBuilder WithSet<TEntity>(Action<DbSet<TEntity>> assertions)where TEntity : class
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbSet<TEntity>> |
assertions |
Action containing all assertions on the Microsoft.EntityFrameworkCore.DbContext entity set.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TEntity |
Type of entity set. |
|
Improve this Doc
View Source
WithSet<TEntity>(Func<DbSet<TEntity>, Boolean>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entity Microsoft.EntityFrameworkCore.DbSet`1 passes the given predicate.
Declaration
IAndDbContextTestBuilder WithSet<TEntity>(Func<DbSet<TEntity>, bool> predicate)where TEntity : class
Parameters
Type |
Name |
Description |
System.Func<Microsoft.EntityFrameworkCore.DbSet<TEntity>, System.Boolean> |
predicate |
Predicate testing the Microsoft.EntityFrameworkCore.DbContext entity set.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TEntity |
Type of entity set. |
|
Improve this Doc
View Source
WithSet<TDbContext, TEntity>(Action<DbSet<TEntity>>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entity Microsoft.EntityFrameworkCore.DbSet`1 passes the given assertions.
Declaration
IAndDbContextTestBuilder WithSet<TDbContext, TEntity>(Action<DbSet<TEntity>> assertions)where TDbContext : DbContext where TEntity : class
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbSet<TEntity>> |
assertions |
Action containing all assertions on the Microsoft.EntityFrameworkCore.DbContext entity set.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext. |
TEntity |
Type of entity set. |
|
Improve this Doc
View Source
WithSet<TDbContext, TEntity>(Func<DbSet<TEntity>, Boolean>)
Tests whether Microsoft.EntityFrameworkCore.DbContext entity Microsoft.EntityFrameworkCore.DbSet`1 passes the given predicate.
Declaration
IAndDbContextTestBuilder WithSet<TDbContext, TEntity>(Func<DbSet<TEntity>, bool> predicate)where TDbContext : DbContext where TEntity : class
Parameters
Type |
Name |
Description |
System.Func<Microsoft.EntityFrameworkCore.DbSet<TEntity>, System.Boolean> |
predicate |
Predicate testing the Microsoft.EntityFrameworkCore.DbContext entity set.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextTestBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext. |
TEntity |
Type of entity set. |