fixes tests

This commit is contained in:
Shannon
2015-09-14 12:30:32 +02:00
parent bee59e39a0
commit 5d7ba5c842

View File

@@ -33,10 +33,12 @@ namespace Umbraco.Tests.Migrations
typeof (FiveZeroMigration)
});
//This is needed because the Migration resolver is creating migratoni instances with their full ctors
var sqlSyntax = new SqlCeSyntaxProvider();
//This is needed because the Migration resolver is creating migration instances with their full ctors
ApplicationContext.EnsureContext(
new ApplicationContext(
new DatabaseContext(Mock.Of<IDatabaseFactory>(), Mock.Of<ILogger>(), Mock.Of<ISqlSyntaxProvider>(), "test"),
new DatabaseContext(Mock.Of<IDatabaseFactory>(), Mock.Of<ILogger>(), sqlSyntax, "test"),
new ServiceContext(),
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>())),
@@ -47,11 +49,11 @@ namespace Umbraco.Tests.Migrations
{
CanResolveBeforeFrozen = true
};
SqlSyntaxContext.SqlSyntaxProvider = new SqlCeSyntaxProvider();
//SqlSyntaxContext.SqlSyntaxProvider = new SqlCeSyntaxProvider();
Resolution.Freeze();
SqlSyntaxContext.SqlSyntaxProvider = new SqlCeSyntaxProvider();
//SqlSyntaxContext.SqlSyntaxProvider = new SqlCeSyntaxProvider();
}
[Test]