@@ -10,6 +10,7 @@ namespace Dnn.PersonaBar.Pages.Tests
1010
1111 using DotNetNuke . Entities . Portals ;
1212 using DotNetNuke . Entities . Tabs ;
13+ using DotNetNuke . Services . Localization ;
1314 using DotNetNuke . Tests . Utilities . Fakes ;
1415
1516 using Microsoft . Extensions . DependencyInjection ;
@@ -33,6 +34,8 @@ public void RunBeforeAnyTest()
3334 this . contentVerifierMock = new Mock < IContentVerifier > ( ) ;
3435 this . portalControllerMock = new Mock < IPortalController > ( ) ;
3536
37+ LocalizationProvider . SetTestableInstance ( Mock . Of < ILocalizationProvider > ( ) ) ;
38+
3639 this . serviceProvider = FakeServiceProvider . Setup (
3740 services =>
3841 {
@@ -47,6 +50,7 @@ public void RunBeforeAnyTest()
4750 public void TearDown ( )
4851 {
4952 this . serviceProvider . Dispose ( ) ;
53+ LocalizationProvider . ClearInstance ( ) ;
5054 }
5155
5256 [ Test ]
@@ -64,7 +68,7 @@ public void Call_PurgePage_WithValidCommand_ShouldReturnSuccessResponse()
6468 this . tabControllerMock . Setup ( t => t . GetTab ( tabId , testPortalId ) ) . Returns ( tab ) ;
6569 this . contentVerifierMock . Setup ( p => p . IsContentExistsForRequestedPortal ( testPortalId , portalSettings , It . IsAny < bool > ( ) ) ) . Returns ( true ) ;
6670
67- IConsoleCommand purgeCommand = new PurgePage ( this . tabControllerMock . Object , this . recycleBinControllerMock . Object , this . contentVerifierMock . Object ) ;
71+ var purgeCommand = new PurgePage ( this . tabControllerMock . Object , this . recycleBinControllerMock . Object , this . contentVerifierMock . Object ) ;
6872
6973 var args = new [ ] { "purge-page" , tabId . ToString ( ) } ;
7074 purgeCommand . Initialize ( args , portalSettings , null , 0 ) ;
@@ -91,7 +95,7 @@ public void Call_PurgePage_WithValidCommandAndPageContentNotAllowed_ShouldReturn
9195 this . tabControllerMock . Setup ( t => t . GetTab ( tabId , portalId ) ) . Returns ( tab ) ;
9296 this . contentVerifierMock . Setup ( p => p . IsContentExistsForRequestedPortal ( portalId , portalSettings , It . IsAny < bool > ( ) ) ) . Returns ( false ) ;
9397
94- IConsoleCommand purgeCommand = new PurgePage ( this . tabControllerMock . Object , this . recycleBinControllerMock . Object , this . contentVerifierMock . Object ) ;
98+ var purgeCommand = new PurgePage ( this . tabControllerMock . Object , this . recycleBinControllerMock . Object , this . contentVerifierMock . Object ) ;
9599
96100 var args = new [ ] { "purge-page" , tabId . ToString ( ) } ;
97101 purgeCommand . Initialize ( args , portalSettings , null , 0 ) ;
0 commit comments