File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/ProjectTemplates/test/Templates.Tests Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,7 @@ public async Task Template_Produces_The_Right_Set_Of_FilesAsync(string arguments
8888 foreach ( var file in filesInFolder )
8989 {
9090 var relativePath = file . Replace ( Project . TemplateOutputDir , "" ) . Replace ( "\\ " , "/" ) . Trim ( '/' ) ;
91- if ( relativePath . StartsWith ( "bin/" , StringComparison . Ordinal ) ||
92- relativePath . StartsWith ( "obj/" , StringComparison . Ordinal ) ||
93- relativePath . Contains ( "/bin/" , StringComparison . Ordinal ) ||
94- relativePath . Contains ( "/obj/" , StringComparison . Ordinal ) )
91+ if ( IsIgnoredPath ( relativePath ) )
9592 {
9693 continue ;
9794 }
@@ -113,6 +110,12 @@ public async Task Template_Produces_The_Right_Set_Of_FilesAsync(string arguments
113110 }
114111 }
115112
113+ private static bool IsIgnoredPath ( string relativePath ) =>
114+ relativePath . StartsWith ( "bin/" , StringComparison . Ordinal ) ||
115+ relativePath . StartsWith ( "obj/" , StringComparison . Ordinal ) ||
116+ relativePath . Contains ( "/bin/" , StringComparison . Ordinal ) ||
117+ relativePath . Contains ( "/obj/" , StringComparison . Ordinal ) ;
118+
116119 private void AssertFileExists ( string basePath , string path , bool shouldExist )
117120 {
118121 var fullPath = Path . Combine ( basePath , path ) ;
You can’t perform that action at this time.
0 commit comments