@@ -23,7 +23,6 @@ public class TargetingPackTests
2323 private readonly string _targetingPackTfm ;
2424 private readonly string _targetingPackRoot ;
2525 private readonly ITestOutputHelper _output ;
26- private readonly bool _isTargetingPackBuilding ;
2726
2827 public TargetingPackTests ( ITestOutputHelper output )
2928 {
@@ -38,17 +37,11 @@ public TargetingPackTests(ITestOutputHelper output)
3837 "packs" ,
3938 "Microsoft.AspNetCore.App.Ref" ,
4039 TestData . GetTestDataValue ( "TargetingPackVersion" ) ) ;
41- _isTargetingPackBuilding = bool . Parse ( TestData . GetTestDataValue ( "IsTargetingPackBuilding" ) ) ;
4240 }
4341
4442 [ Fact ]
4543 public void TargetingPackContainsListedAssemblies ( )
4644 {
47- if ( ! _isTargetingPackBuilding )
48- {
49- return ;
50- }
51-
5245 var actualAssemblies = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" )
5346 . Select ( Path . GetFileNameWithoutExtension )
5447 . ToHashSet ( ) ;
@@ -74,11 +67,6 @@ public void TargetingPackContainsListedAssemblies()
7467 [ Fact ]
7568 public void RefAssembliesHaveExpectedAssemblyVersions ( )
7669 {
77- if ( ! _isTargetingPackBuilding )
78- {
79- return ;
80- }
81-
8270 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" , SearchOption . AllDirectories ) ;
8371 Assert . NotEmpty ( dlls ) ;
8472
@@ -99,11 +87,6 @@ public void RefAssembliesHaveExpectedAssemblyVersions()
9987 [ Fact ]
10088 public void RefAssemblyReferencesHaveExpectedAssemblyVersions ( )
10189 {
102- if ( ! _isTargetingPackBuilding )
103- {
104- return ;
105- }
106-
10790 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" , _targetingPackTfm ) , "*.dll" , SearchOption . AllDirectories ) ;
10891 Assert . NotEmpty ( dlls ) ;
10992
@@ -126,11 +109,6 @@ public void RefAssemblyReferencesHaveExpectedAssemblyVersions()
126109 [ Fact ]
127110 public void PackageOverridesContainsCorrectEntries ( )
128111 {
129- if ( ! _isTargetingPackBuilding )
130- {
131- return ;
132- }
133-
134112 var packageOverridePath = Path . Combine ( _targetingPackRoot , "data" , "PackageOverrides.txt" ) ;
135113
136114 AssertEx . FileExists ( packageOverridePath ) ;
@@ -190,11 +168,6 @@ public void PackageOverridesContainsCorrectEntries()
190168 [ Fact ]
191169 public void AssembliesAreReferenceAssemblies ( )
192170 {
193- if ( ! _isTargetingPackBuilding )
194- {
195- return ;
196- }
197-
198171 IEnumerable < string > dlls = Directory . GetFiles ( Path . Combine ( _targetingPackRoot , "ref" ) , "*.dll" , SearchOption . AllDirectories ) ;
199172 Assert . NotEmpty ( dlls ) ;
200173
@@ -222,11 +195,6 @@ public void AssembliesAreReferenceAssemblies()
222195 [ Fact ]
223196 public void PlatformManifestListsAllFiles ( )
224197 {
225- if ( ! _isTargetingPackBuilding )
226- {
227- return ;
228- }
229-
230198 var platformManifestPath = Path . Combine ( _targetingPackRoot , "data" , "PlatformManifest.txt" ) ;
231199 var expectedAssemblies = TestData . GetSharedFxDependencies ( )
232200 . Split ( ';' , StringSplitOptions . RemoveEmptyEntries )
@@ -292,11 +260,6 @@ public void PlatformManifestListsAllFiles()
292260 [ Fact ]
293261 public void FrameworkListListsContainsCorrectEntries ( )
294262 {
295- if ( ! _isTargetingPackBuilding )
296- {
297- return ;
298- }
299-
300263 var frameworkListPath = Path . Combine ( _targetingPackRoot , "data" , "FrameworkList.xml" ) ;
301264 var expectedAssemblies = TestData . GetTargetingPackDependencies ( )
302265 . Split ( ';' , StringSplitOptions . RemoveEmptyEntries )
@@ -364,7 +327,7 @@ void CompareFrameworkElements(HashSet<string> expectedAssemblyNames, IEnumerable
364327 [ Fact ]
365328 public void FrameworkListListsContainsCorrectPaths ( )
366329 {
367- if ( ! _isTargetingPackBuilding || string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
330+ if ( string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
368331 {
369332 return ;
370333 }
@@ -406,7 +369,7 @@ public void FrameworkListListsContainsCorrectPaths()
406369 [ Fact ]
407370 public void FrameworkListListsContainsAnalyzerLanguage ( )
408371 {
409- if ( ! _isTargetingPackBuilding || string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
372+ if ( string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
410373 {
411374 return ;
412375 }
0 commit comments