Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename MigrationsInfrastructureFixtureBase #19718

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace Microsoft.EntityFrameworkCore
{
public abstract class MigrationsInfrastructureTestBase<TFixture> : IClassFixture<TFixture>
where TFixture : MigrationsFixtureBase, new()
where TFixture : MigrationsInfrastructureFixtureBase, new()
{
protected TFixture Fixture { get; }

Expand Down Expand Up @@ -263,11 +263,11 @@ public virtual void Can_get_active_provider()
{
using var db = Fixture.CreateContext();
var migrator = db.GetService<IMigrator>();
MigrationsFixtureBase.ActiveProvider = null;
MigrationsInfrastructureFixtureBase.ActiveProvider = null;

migrator.GenerateScript(toMigration: "Migration1");

ActiveProvider = MigrationsFixtureBase.ActiveProvider;
ActiveProvider = MigrationsInfrastructureFixtureBase.ActiveProvider;
}

[ConditionalFact]
Expand Down Expand Up @@ -308,7 +308,7 @@ protected virtual void DiffSnapshot(ModelSnapshot snapshot, DbContext context)
private void SetSql(string value) => Sql = value.Replace(ProductInfo.GetVersion(), "7.0.0-test");
}

public abstract class MigrationsFixtureBase : SharedStoreFixtureBase<MigrationsFixtureBase.MigrationsContext>
public abstract class MigrationsInfrastructureFixtureBase : SharedStoreFixtureBase<MigrationsInfrastructureFixtureBase.MigrationsContext>
{
public static string ActiveProvider { get; set; }
public new RelationalTestStore TestStore => (RelationalTestStore)base.TestStore;
Expand Down Expand Up @@ -355,7 +355,7 @@ private class Migration1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
MigrationsFixtureBase.ActiveProvider = migrationBuilder.ActiveProvider;
MigrationsInfrastructureFixtureBase.ActiveProvider = migrationBuilder.ActiveProvider;

migrationBuilder
.CreateTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
}
}

public class MigrationsInfrastructureSqlServerFixture : MigrationsFixtureBase
public class MigrationsInfrastructureSqlServerFixture : MigrationsInfrastructureFixtureBase
{
protected override ITestStoreFactory TestStoreFactory => SqlServerTestStoreFactory.Instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ public override void Can_diff_against_3_0_ASP_NET_Identity_model()
DiffSnapshot(new AspNetIdentity30ModelSnapshot(), context);
}

public class MigrationsInfrastructureSqliteFixture : MigrationsFixtureBase
public class MigrationsInfrastructureSqliteFixture : MigrationsInfrastructureFixtureBase
{
protected override ITestStoreFactory TestStoreFactory => SqliteTestStoreFactory.Instance;
}
Expand Down