File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -723,7 +723,7 @@ public async Task Should_Provide_The_Merged_Result_Using_Project_Settings_Async(
723
723
}
724
724
725
725
[ Test ]
726
- public async Task Should_Add_Common_Assembly_Excludes_Includes_Async ( )
726
+ public async Task Should_Add_Common_Assembly_Excludes_Includes_Ignoring_Whitespace_Async ( )
727
727
{
728
728
var mockAppOptions = new Mock < IAppOptions > ( ) ;
729
729
mockAppOptions . SetupAllProperties ( ) ;
@@ -732,8 +732,8 @@ public async Task Should_Add_Common_Assembly_Excludes_Includes_Async()
732
732
appOptions . Include = new string [ ] { "oldinclude" } ;
733
733
appOptions . ModulePathsExclude = new string [ ] { "msexclude" } ;
734
734
appOptions . ModulePathsInclude = new string [ ] { "msinclude" } ;
735
- appOptions . ExcludeAssemblies = new string [ ] { "excludeassembly" } ;
736
- appOptions . IncludeAssemblies = new string [ ] { "includeassembly" } ;
735
+ appOptions . ExcludeAssemblies = new string [ ] { "excludeassembly" , " " } ;
736
+ appOptions . IncludeAssemblies = new string [ ] { "includeassembly" , " " } ;
737
737
738
738
var autoMoqer = new AutoMoqer ( ) ;
739
739
var coverageProjectSettingsManager = autoMoqer . Create < CoverageProjectSettingsManager > ( ) ;
Original file line number Diff line number Diff line change @@ -58,14 +58,15 @@ private void AddCommonAssemblyExcludesIncludes(IAppOptions appOptions)
58
58
}
59
59
var newMs = ListFromExisting ( ms ) ;
60
60
var newOldStyle = ListFromExisting ( oldStyle ) ;
61
-
62
- common . ToList ( ) . ForEach ( assemblyFileName =>
61
+
62
+ var nonWhitespaceCommon = common . Where ( c => ! string . IsNullOrWhiteSpace ( c ) ) ;
63
+ foreach ( var assemblyFileName in nonWhitespaceCommon )
63
64
{
64
65
var msModulePath = $ ".*\\ { assemblyFileName } .dll$";
65
66
newMs . Add ( msModulePath ) ;
66
67
var old = $ "[{ assemblyFileName } ]*";
67
68
newOldStyle . Add ( old ) ;
68
- } ) ;
69
+ }
69
70
70
71
return ( newOldStyle . ToArray ( ) , newMs . ToArray ( ) ) ;
71
72
}
You can’t perform that action at this time.
0 commit comments