@@ -18,7 +18,6 @@ public class TargetingPackTests
1818 private readonly string _targetingPackTfm ;
1919 private readonly string _targetingPackRoot ;
2020 private readonly ITestOutputHelper _output ;
21- private readonly bool _isTargetingPackBuilding ;
2221
2322 public TargetingPackTests ( ITestOutputHelper output )
2423 {
@@ -33,17 +32,11 @@ public TargetingPackTests(ITestOutputHelper output)
3332 "packs" ,
3433 "Microsoft.AspNetCore.App.Ref" ,
3534 TestData . GetTestDataValue ( "TargetingPackVersion" ) ) ;
36- _isTargetingPackBuilding = bool . Parse ( TestData . GetTestDataValue ( "IsTargetingPackBuilding" ) ) ;
3735 }
3836
3937 [ Fact ]
4038 public void TargetingPackContainsListedAssemblies ( )
4139 {
42- if ( ! _isTargetingPackBuilding )
43- {
44- return ;
45- }
46-
4740 var actualAssemblies = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" )
4841 . Select ( Path . GetFileNameWithoutExtension )
4942 . ToHashSet ( ) ;
@@ -69,11 +62,6 @@ public void TargetingPackContainsListedAssemblies()
6962 [ Fact ]
7063 public void RefAssembliesHaveExpectedAssemblyVersions ( )
7164 {
72- if ( ! _isTargetingPackBuilding )
73- {
74- return ;
75- }
76-
7765 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" , SearchOption . AllDirectories ) ;
7866 Assert . NotEmpty ( dlls ) ;
7967
@@ -94,11 +82,6 @@ public void RefAssembliesHaveExpectedAssemblyVersions()
9482 [ Fact ]
9583 public void RefAssemblyReferencesHaveExpectedAssemblyVersions ( )
9684 {
97- if ( ! _isTargetingPackBuilding )
98- {
99- return ;
100- }
101-
10285 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" , SearchOption . AllDirectories ) ;
10386 Assert . NotEmpty ( dlls ) ;
10487
@@ -121,11 +104,6 @@ public void RefAssemblyReferencesHaveExpectedAssemblyVersions()
121104 [ Fact ]
122105 public void PackageOverridesContainsCorrectEntries ( )
123106 {
124- if ( ! _isTargetingPackBuilding )
125- {
126- return ;
127- }
128-
129107 var packageOverridePath = Path . Combine ( _targetingPackRoot , "data" , "PackageOverrides.txt" ) ;
130108
131109 AssertEx . FileExists ( packageOverridePath ) ;
@@ -185,11 +163,6 @@ public void PackageOverridesContainsCorrectEntries()
185163 [ Fact ]
186164 public void AssembliesAreReferenceAssemblies ( )
187165 {
188- if ( ! _isTargetingPackBuilding )
189- {
190- return ;
191- }
192-
193166 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" ) , "*.dll" , SearchOption . AllDirectories ) ;
194167 Assert . NotEmpty ( dlls ) ;
195168
@@ -219,11 +192,6 @@ public void AssembliesAreReferenceAssemblies()
219192 [ Fact ]
220193 public void PlatformManifestListsAllFiles ( )
221194 {
222- if ( ! _isTargetingPackBuilding )
223- {
224- return ;
225- }
226-
227195 var platformManifestPath = Path . Combine ( _targetingPackRoot , "data" , "PlatformManifest.txt" ) ;
228196 var expectedAssemblies = TestData . GetSharedFxDependencies ( )
229197 . Split ( ';' , StringSplitOptions . RemoveEmptyEntries )
@@ -289,11 +257,6 @@ public void PlatformManifestListsAllFiles()
289257 [ Fact ]
290258 public void FrameworkListListsContainsCorrectEntries ( )
291259 {
292- if ( ! _isTargetingPackBuilding )
293- {
294- return ;
295- }
296-
297260 var frameworkListPath = Path . Combine ( _targetingPackRoot , "data" , "FrameworkList.xml" ) ;
298261 var expectedAssemblies = TestData . GetTargetingPackDependencies ( )
299262 . Split ( ';' , StringSplitOptions . RemoveEmptyEntries )
@@ -361,7 +324,7 @@ void CompareFrameworkElements(HashSet<string> expectedAssemblyNames, IEnumerable
361324 [ Fact ]
362325 public void FrameworkListListsContainsCorrectPaths ( )
363326 {
364- if ( ! _isTargetingPackBuilding || string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
327+ if ( string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
365328 {
366329 return ;
367330 }
@@ -403,7 +366,7 @@ public void FrameworkListListsContainsCorrectPaths()
403366 [ Fact ]
404367 public void FrameworkListListsContainsAnalyzerLanguage ( )
405368 {
406- if ( ! _isTargetingPackBuilding || string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
369+ if ( string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
407370 {
408371 return ;
409372 }
0 commit comments