Fix temporal coupling

This commit is contained in:
Stephan
2019-04-02 13:35:01 +02:00
parent 04427e4c61
commit 27e145fe3d
34 changed files with 158 additions and 40 deletions

View File

@@ -15,12 +15,12 @@ namespace Umbraco.Tests.Benchmarks
[MemoryDiagnoser]
public class ModelToSqlExpressionHelperBenchmarks
{
protected ISqlContext MockSqlContext()
protected Lazy<ISqlContext> MockSqlContext()
{
var sqlContext = Mock.Of<ISqlContext>();
var syntax = new SqlCeSyntaxProvider();
Mock.Get(sqlContext).Setup(x => x.SqlSyntax).Returns(syntax);
return sqlContext;
return new Lazy<ISqlContext>(() => sqlContext);
}
protected ConcurrentDictionary<Type, ConcurrentDictionary<string, string>> CreateMaps()