@@ -345,7 +345,7 @@ public void FunctionAppExecutionShouldStopIfNoPreviousDependenciesAreInstalled()
345345
346346 // Create DependencyManager and configure it to mimic being unable to reach
347347 // the PSGallery to retrieve the latest module version
348- var dependencyManager = new TestDependencyManager ( ) ;
348+ var dependencyManager = new TestDependencyManager2 ( ) ;
349349 dependencyManager . GetLatestModuleVersionThrows = true ;
350350
351351 // Trying to initialize the dependencyManager should throw
@@ -378,7 +378,7 @@ public void FunctionAppExecutionShouldContinueIfPreviousDependenciesExist()
378378
379379 // Create DependencyManager and configure it to mimic being unable to reach
380380 // the PSGallery to retrive the latest module version
381- var dependencyManager = new TestDependencyManager ( ) ;
381+ var dependencyManager = new TestDependencyManager2 ( ) ;
382382 dependencyManager . GetLatestModuleVersionThrows = true ;
383383
384384 // Create a path to mimic an existing installation of the Az module
@@ -426,9 +426,6 @@ internal class TestDependencyManager : DependencyManager
426426
427427 private int SaveModuleCount { get ; set ; }
428428
429- // Settings for GetLatestModuleVersionFromTheGallery
430- public bool GetLatestModuleVersionThrows { get ; set ; }
431-
432429 internal TestDependencyManager ( )
433430 {
434431 }
@@ -452,6 +449,16 @@ protected override void RemoveSaveModuleModules(PowerShell pwsh)
452449 {
453450 return ;
454451 }
452+ }
453+
454+ internal class TestDependencyManager2 : DependencyManager
455+ {
456+ // Settings for GetLatestModuleVersionFromTheGallery
457+ public bool GetLatestModuleVersionThrows { get ; set ; }
458+
459+ internal TestDependencyManager2 ( )
460+ {
461+ }
455462
456463 protected override string GetLatestModuleVersionFromThePSGallery ( string moduleName , string majorVersion )
457464 {
0 commit comments