File tree Expand file tree Collapse file tree
src/Tasks/Microsoft.NET.Build.Tasks.UnitTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ public void ItProducesSameResultsRegardlessOfCwd()
114114 "task should return the same result regardless of CWD" ) ;
115115 engine1 . Errors . Count . Should ( ) . Be ( engine2 . Errors . Count ,
116116 "error count should be the same in both environments" ) ;
117+ task1 . ProcessedContentItems . Length . Should ( ) . Be ( task2 . ProcessedContentItems . Length ,
118+ "ProcessedContentItems count should be identical regardless of CWD" ) ;
119+ task1 . CopyLocalItems . Length . Should ( ) . Be ( task2 . CopyLocalItems . Length ,
120+ "CopyLocalItems count should be identical regardless of CWD" ) ;
121+ task1 . FileWrites . Length . Should ( ) . Be ( task2 . FileWrites . Length ,
122+ "FileWrites count should be identical regardless of CWD" ) ;
117123 }
118124 finally
119125 {
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ public void ItProducesSameResultsInMultiProcessAndMultiThreadedEnvironments()
109109 "task should return the same result regardless of CWD" ) ;
110110 engine1 . Errors . Count . Should ( ) . Be ( engine2 . Errors . Count ,
111111 "error count should be identical in both environments" ) ;
112+ task1 . ResolvedAssets . Length . Should ( ) . Be ( task2 . ResolvedAssets . Length ,
113+ "ResolvedAssets count should be identical regardless of CWD" ) ;
112114 }
113115 finally
114116 {
Original file line number Diff line number Diff line change @@ -413,7 +413,8 @@ public void ProduceContentAssets_EmptyDependencies_Succeeds()
413413 {
414414 BuildEngine = new MockBuildEngine ( ) ,
415415 ContentFileDependencies = Array . Empty < ITaskItem > ( ) ,
416- ProjectLanguage = "C#"
416+ ProjectLanguage = "C#" ,
417+ TaskEnvironment = TaskEnvironmentHelper . CreateForTest ( )
417418 } ;
418419
419420 var result = task . Execute ( ) ;
@@ -497,6 +498,11 @@ public async System.Threading.Tasks.Task GetDefaultPlatformTargetForNetFramework
497498
498499 startGate . Wait ( ) ;
499500 task . Execute ( ) ;
501+
502+ if ( task . DefaultPlatformTarget != "AnyCPU" )
503+ {
504+ errors . Add ( $ "Thread { idx } : Expected 'AnyCPU' but got '{ task . DefaultPlatformTarget } '") ;
505+ }
500506 }
501507 catch ( Exception ex )
502508 {
@@ -536,6 +542,11 @@ public async System.Threading.Tasks.Task GetEmbeddedApphostPaths_ConcurrentExecu
536542
537543 startGate . Wait ( ) ;
538544 task . Execute ( ) ;
545+
546+ if ( task . EmbeddedApphostPaths == null || task . EmbeddedApphostPaths . Length != 1 )
547+ {
548+ errors . Add ( $ "Thread { idx } : Expected 1 path but got { task . EmbeddedApphostPaths ? . Length } ") ;
549+ }
539550 }
540551 catch ( Exception ex )
541552 {
@@ -573,6 +584,11 @@ public async System.Threading.Tasks.Task GetNuGetShortFolderName_ConcurrentExecu
573584
574585 startGate . Wait ( ) ;
575586 task . Execute ( ) ;
587+
588+ if ( task . NuGetShortFolderName != "net8.0" )
589+ {
590+ errors . Add ( $ "Thread { idx } : Expected 'net8.0' but got '{ task . NuGetShortFolderName } '") ;
591+ }
576592 }
577593 catch ( Exception ex )
578594 {
You can’t perform that action at this time.
0 commit comments