Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

33 lines
1.3 KiB
C#

// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.Migrations
{
using System.Data.Entity.Migrations.Design;
using Xunit;
public class NoTestInfraScenarios : TestBase
{
[Fact]
public void Can_generate_migration_from_user_code()
{
var migrator
= new DbMigrator(
new DbMigrationsConfiguration
{
ContextType = typeof(ShopContext_v1),
MigrationsAssembly = SystemComponentModelDataAnnotationsAssembly,
MigrationsNamespace = "Foo",
MigrationsDirectory = "Bar"
});
var migration = new MigrationScaffolder(migrator.Configuration).Scaffold("Test");
Assert.False(string.IsNullOrWhiteSpace(migration.DesignerCode));
Assert.False(string.IsNullOrWhiteSpace(migration.Language));
Assert.False(string.IsNullOrWhiteSpace(migration.MigrationId));
Assert.False(string.IsNullOrWhiteSpace(migration.UserCode));
Assert.False(string.IsNullOrWhiteSpace(migration.Directory));
}
}
}