@@ -235,7 +235,7 @@ private static string GetApplicationWorkingDirectory(string testAssemblyLocation
235
235
/// <param name="testAssemblyLocation">The path to the test's directory</param>
236
236
/// <param name="appLocation">The path to the processes directory</param>
237
237
/// <returns>The path to the directory for the given app</returns>
238
- private static string GetAppsettingsDirectory ( string testAssemblyLocation , string appLocation )
238
+ private static string GetAbsoluteAppDirectory ( string testAssemblyLocation , string appLocation )
239
239
{
240
240
string testedAppLocation = Path . GetDirectoryName ( testAssemblyLocation ) ! ;
241
241
// e.g. microsoft-identity-web\tests\E2E Tests\WebAppUiTests\bin\Debug\net6.0
@@ -528,7 +528,7 @@ private static void BuildSolution(string solutionPath)
528
528
process . WaitForExit ( ) ;
529
529
}
530
530
531
- Console . WriteLine ( "Solution rebuild initiated." ) ;
531
+ Console . WriteLine ( "Solution build initiated." ) ;
532
532
}
533
533
534
534
/// <summary>
@@ -538,23 +538,29 @@ private static void BuildSolution(string solutionPath)
538
538
/// <param name="sampleRelPath">Relative path to the sample app to build starting at the repo's root, does not include appsettings filename</param>
539
539
/// <param name="testAppsettingsRelPath">Relative path to the test appsettings file starting at the repo's root, includes appsettings filename</param>
540
540
/// <param name="solutionFileName">Filename for the sln file to build</param>
541
- public static void BuildSampleWithTestAppsettings (
541
+ public static void BuildSampleUsingTestAppsettings (
542
542
string testAssemblyLocation ,
543
543
string sampleRelPath ,
544
544
string testAppsettingsRelPath ,
545
545
string solutionFileName
546
546
)
547
547
{
548
- string appsettingsDirectory = GetAppsettingsDirectory ( testAssemblyLocation , sampleRelPath ) ;
548
+ string appsettingsDirectory = GetAbsoluteAppDirectory ( testAssemblyLocation , sampleRelPath ) ;
549
549
string appsettingsAbsPath = Path . Combine ( appsettingsDirectory , TestConstants . AppSetttingsDotJson ) ;
550
- string testAppsettingsAbsPath = GetAppsettingsDirectory ( testAssemblyLocation , testAppsettingsRelPath ) ;
550
+ string testAppsettingsAbsPath = GetAbsoluteAppDirectory ( testAssemblyLocation , testAppsettingsRelPath ) ;
551
551
552
552
SwapFiles ( appsettingsAbsPath , testAppsettingsAbsPath ) ;
553
553
554
- try { BuildSolution ( appsettingsDirectory + solutionFileName ) ; }
554
+ try { BuildSolution ( Path . Combine ( appsettingsDirectory , solutionFileName ) ) ; }
555
555
catch ( Exception ) { throw ; }
556
556
finally { SwapFiles ( appsettingsAbsPath , testAppsettingsAbsPath ) ; }
557
557
}
558
+
559
+ public static void BuildSampleUsingSampleAppsettings ( string testAssemblyLocation , string sampleRelPath , string solutionFileName )
560
+ {
561
+ string appsDirectory = GetAbsoluteAppDirectory ( testAssemblyLocation , sampleRelPath ) ;
562
+ BuildSolution ( Path . Combine ( appsDirectory , solutionFileName ) ) ;
563
+ }
558
564
}
559
565
560
566
/// <summary>
0 commit comments