MigrationsTestBase<TFixture> MigrationsTestBase(Of TFixture) Class

Syntax

Declaration

public abstract class MigrationsTestBase<TFixture> : IClassFixture<TFixture> where TFixture : MigrationsFixtureBase, new ()Public MustInherit Class MigrationsTestBase(Of TFixture As {MigrationsFixtureBase, New})
    Inherits IClassFixture(Of TFixture)

Type Parameters

TFixture

Inheritance Hierarchy

  • System.Object
    System.Object
  • MigrationsTestBase<TFixture>
    MigrationsTestBase(Of TFixture)

Constructors summary

Properties summary

Methods summary

Constructors

  • MigrationsTestBase(TFixture)
    MigrationsTestBase(TFixture)
    protected MigrationsTestBase(TFixture fixture)Protected Sub New(fixture As TFixture)

    Parameters

    • fixture
      TFixture
      TFixture

Properties

  • ActiveProvider
    ActiveProvider
    protected string ActiveProvider { get; }Protected ReadOnly Property ActiveProvider As String

    Property Value

    • System.String
      System.String
  • Fixture
    Fixture
    protected TFixture Fixture { get; }Protected ReadOnly Property Fixture As TFixture

    Property Value

    • TFixture
      TFixture
  • Sql
    Sql
    protected string Sql { get; }Protected ReadOnly Property Sql As String

    Property Value

    • System.String
      System.String

Methods

  • AssertFirstMigration(DbConnection)
    AssertFirstMigration(DbConnection)
    protected virtual void AssertFirstMigration(DbConnection connection)Protected Overridable Sub AssertFirstMigration(connection As DbConnection)

    Parameters

    • connection
      System.Data.Common.DbConnection
      System.Data.Common.DbConnection
  • AssertFirstMigrationAsync(DbConnection)
    AssertFirstMigrationAsync(DbConnection)
    protected virtual Task AssertFirstMigrationAsync(DbConnection connection)Protected Overridable Function AssertFirstMigrationAsync(connection As DbConnection) As Task

    Parameters

    • connection
      System.Data.Common.DbConnection
      System.Data.Common.DbConnection

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task
  • AssertSecondMigration(DbConnection)
    AssertSecondMigration(DbConnection)
    protected virtual void AssertSecondMigration(DbConnection connection)Protected Overridable Sub AssertSecondMigration(connection As DbConnection)

    Parameters

    • connection
      System.Data.Common.DbConnection
      System.Data.Common.DbConnection
  • AssertSecondMigrationAsync(DbConnection)
    AssertSecondMigrationAsync(DbConnection)
    protected virtual Task AssertSecondMigrationAsync(DbConnection connection)Protected Overridable Function AssertSecondMigrationAsync(connection As DbConnection) As Task

    Parameters

    • connection
      System.Data.Common.DbConnection
      System.Data.Common.DbConnection

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task
  • BuildFirstMigration(MigrationBuilder)
    BuildFirstMigration(MigrationBuilder)
    protected virtual void BuildFirstMigration(MigrationBuilder migrationBuilder)Protected Overridable Sub BuildFirstMigration(migrationBuilder As MigrationBuilder)

    Parameters

  • BuildSecondMigration(MigrationBuilder)
    BuildSecondMigration(MigrationBuilder)
    protected virtual void BuildSecondMigration(MigrationBuilder migrationBuilder)Protected Overridable Sub BuildSecondMigration(migrationBuilder As MigrationBuilder)

    Parameters

  • Can_apply_all_migrations()
    Can_apply_all_migrations()
    public void Can_apply_all_migrations()Public Sub Can_apply_all_migrations
  • Can_apply_all_migrations_async()
    Can_apply_all_migrations_async()
    public Task Can_apply_all_migrations_async()Public Function Can_apply_all_migrations_async As Task

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task
  • Can_apply_one_migration()
    Can_apply_one_migration()
    public void Can_apply_one_migration()Public Sub Can_apply_one_migration
  • Can_execute_operations()
    Can_execute_operations()
    public virtual Task Can_execute_operations()Public Overridable Function Can_execute_operations As Task

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task

    Remarks

    Creating databases and executing DDL is slow. This oddly-structured test allows us to get the most ammount of coverage using the least ammount of database operations.

  • Can_generate_down_script_using_names()
    Can_generate_down_script_using_names()
    public virtual void Can_generate_down_script_using_names()Public Overridable Sub Can_generate_down_script_using_names
  • Can_generate_down_scripts()
    Can_generate_down_scripts()
    public virtual void Can_generate_down_scripts()Public Overridable Sub Can_generate_down_scripts
  • Can_generate_idempotent_down_scripts()
    Can_generate_idempotent_down_scripts()
    public virtual void Can_generate_idempotent_down_scripts()Public Overridable Sub Can_generate_idempotent_down_scripts
  • Can_generate_idempotent_up_scripts()
    Can_generate_idempotent_up_scripts()
    public virtual void Can_generate_idempotent_up_scripts()Public Overridable Sub Can_generate_idempotent_up_scripts
  • Can_generate_migration_from_initial_database_to_initial()
    Can_generate_migration_from_initial_database_to_initial()
    public virtual void Can_generate_migration_from_initial_database_to_initial()Public Overridable Sub Can_generate_migration_from_initial_database_to_initial
  • Can_generate_no_migration_script()
    Can_generate_no_migration_script()
    public virtual void Can_generate_no_migration_script()Public Overridable Sub Can_generate_no_migration_script
  • Can_generate_one_down_script()
    Can_generate_one_down_script()
    public virtual void Can_generate_one_down_script()Public Overridable Sub Can_generate_one_down_script
  • Can_generate_one_up_script()
    Can_generate_one_up_script()
    public virtual void Can_generate_one_up_script()Public Overridable Sub Can_generate_one_up_script
  • Can_generate_up_script_using_names()
    Can_generate_up_script_using_names()
    public virtual void Can_generate_up_script_using_names()Public Overridable Sub Can_generate_up_script_using_names
  • Can_generate_up_scripts()
    Can_generate_up_scripts()
    public virtual void Can_generate_up_scripts()Public Overridable Sub Can_generate_up_scripts
  • Can_get_active_provider()
    Can_get_active_provider()
    public virtual void Can_get_active_provider()Public Overridable Sub Can_get_active_provider
  • Can_revert_all_migrations()
    Can_revert_all_migrations()
    public void Can_revert_all_migrations()Public Sub Can_revert_all_migrations
  • Can_revert_one_migrations()
    Can_revert_one_migrations()
    public void Can_revert_one_migrations()Public Sub Can_revert_one_migrations
  • ExecuteAsync(IServiceProvider, Action<MigrationBuilder>)
    ExecuteAsync(IServiceProvider, Action(Of MigrationBuilder))
    protected virtual Task ExecuteAsync(IServiceProvider services, Action<MigrationBuilder> buildMigration)Protected Overridable Function ExecuteAsync(services As IServiceProvider, buildMigration As Action(Of MigrationBuilder)) As Task

    Parameters

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.Specification.Tests.dll