From 6cce7ef3f20f0ded7f492bdf1292298c4be45381 Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 22 Sep 2020 08:56:23 +0200 Subject: [PATCH] Make internals visible to Moq, otherwise we cannot mock ILogger For some reason adding the assembly attribute doesn't work for the test project, I need to look into this. --- src/Umbraco.Core/Umbraco.Core.csproj | 3 +++ src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj | 3 +++ .../Umbraco.PublishedCache.NuCache.csproj | 3 +++ src/Umbraco.Tests/TestHelpers/Stubs/TestControllerFactory.cs | 2 ++ 4 files changed, 11 insertions(+) diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 6fa21130fc..fadf6b592d 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -39,5 +39,8 @@ <_Parameter1>Umbraco.Tests.Integration + + <_Parameter1>DynamicProxyGenAssembly2 + diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index 2b663431ae..5c27322a68 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -90,6 +90,9 @@ <_Parameter1>Umbraco.Tests.UnitTests + + <_Parameter1>DynamicProxyGenAssembly2 + diff --git a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj index 4a7733a810..a44ffcadb7 100644 --- a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj +++ b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj @@ -27,6 +27,9 @@ <_Parameter1>Umbraco.Tests.Benchmarks + + <_Parameter1>DynamicProxyGenAssembly2 + diff --git a/src/Umbraco.Tests/TestHelpers/Stubs/TestControllerFactory.cs b/src/Umbraco.Tests/TestHelpers/Stubs/TestControllerFactory.cs index d0348cf589..c2bb9032d2 100644 --- a/src/Umbraco.Tests/TestHelpers/Stubs/TestControllerFactory.cs +++ b/src/Umbraco.Tests/TestHelpers/Stubs/TestControllerFactory.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using System.Web.Mvc; using System.Web.Routing; using System.Web.SessionState; @@ -12,6 +13,7 @@ using Umbraco.Core.Composing; using Umbraco.Web; using Current = Umbraco.Web.Composing.Current; +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] namespace Umbraco.Tests.TestHelpers.Stubs { ///