From 77e634d665014cdbc2bbc0a2cac8f9f7bfc282cf Mon Sep 17 00:00:00 2001 From: Manoj Attal Date: Sat, 29 May 2021 11:41:31 +0000 Subject: [PATCH] Fix failing UTs --- .../FileUploadControllerTests.cs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/DNN Platform/Tests/DotNetNuke.Tests.Web/InternalServices/FileUploadControllerTests.cs b/DNN Platform/Tests/DotNetNuke.Tests.Web/InternalServices/FileUploadControllerTests.cs index 59d703b6c35..e3f5d8251ab 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.Web/InternalServices/FileUploadControllerTests.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.Web/InternalServices/FileUploadControllerTests.cs @@ -11,11 +11,9 @@ using Common; using Common.Lists; - using Common.Utilities; using Data; using DotNetNuke.Entities.Portals; - using DotNetNuke.Instrumentation; using DotNetNuke.Web.InternalServices; using Microsoft.Extensions.DependencyInjection; @@ -33,9 +31,7 @@ [TestFixture] public class FileUploadControllerTests { - private Mock _mockLoggerSource = new Mock(); private Mock _mockDataProvider; - private Mock _mockCBO = new Mock(); private FileUploadController _testInstance; private Mock _mockCachingProvider; private Mock _mockPortalController; @@ -44,23 +40,16 @@ public class FileUploadControllerTests [SetUp] public void SetUp() { - LoggerSource.SetTestableInstance(this._mockLoggerSource.Object); - CBO.SetTestableInstance(this._mockCBO.Object); + this.SetupDataProvider(); + this.SetupCachingProvider(); + this.SetupPortalSettings(); this.SetupServiceProvider(); this.SetupSynchronizationContext(); } - [TearDown] - public void TearDown() - { - PortalController.ClearInstance(); - Globals.DependencyProvider = null; - CBO.ClearInstance(); - } - [Test] [SetCulture("tr-TR")] public async Task UploadFromLocal_ShouldUploadFile_WithTrCultureAsync()