@@ -400,7 +400,7 @@ public void ParsePackageConfig_GivenAInputFilePath_ReturnsSuccess()
400400 int expectednoofcomponents = 7 ;
401401 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
402402 string outFolder = Path . GetDirectoryName ( exePath ) ;
403- string packagefilepath = outFolder + @"\ PackageIdentifierUTTestFiles\ packages.config";
403+ string packagefilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles" , " packages.config") ) ;
404404
405405 IFolderAction folderAction = new FolderAction ( ) ;
406406 IFileOperations fileOperations = new FileOperations ( ) ;
@@ -410,7 +410,7 @@ public void ParsePackageConfig_GivenAInputFilePath_ReturnsSuccess()
410410 SW360 = new SW360 ( ) ,
411411 Directory = new LCT . Common . Directory ( folderAction , fileOperations )
412412 {
413- InputFolder = outFolder + @"\ PackageIdentifierUTTestFiles"
413+ InputFolder = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") )
414414 }
415415 } ;
416416
@@ -435,7 +435,7 @@ public void InputFileIdentifaction_GivenARootPath_ReturnsSuccess()
435435 } ;
436436 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
437437 string outFolder = Path . GetDirectoryName ( exePath ) ;
438- string folderfilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
438+ string folderfilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
439439
440440 //Act
441441 List < string > allFoundConfigFiles = FolderScanner . FileScanner ( folderfilepath , config ) ;
@@ -458,7 +458,7 @@ public void InputFileIdentifaction_GivenIncludeFileAsNull_ReturnsArgumentNullExc
458458 } ;
459459 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
460460 string outFolder = Path . GetDirectoryName ( exePath ) ;
461- string folderfilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
461+ string folderfilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
462462
463463 //Act & Assert
464464 Assert . Throws ( typeof ( ArgumentNullException ) , ( ) => FolderScanner . FileScanner ( folderfilepath , config ) ) ;
@@ -493,7 +493,7 @@ public void InputFileIdentifaction_GivenInvalidInputFile_ReturnsArgumentNullExce
493493 Exclude = null
494494
495495 } ;
496- string folderfilepath = @ "../ PackageIdentifierUTTestFiles";
496+ string folderfilepath = Path . GetFullPath ( Path . Combine ( ".." , " PackageIdentifierUTTestFiles") ) ;
497497
498498 //Act & Assert
499499 Assert . Throws ( typeof ( DirectoryNotFoundException ) , ( ) => FolderScanner . FileScanner ( folderfilepath , config ) ) ;
@@ -520,7 +520,7 @@ public void Parsecsproj_GivenXMLFile_ReturnsSuccess()
520520 //Arrange
521521 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
522522 string outFolder = Path . GetDirectoryName ( exePath ) ;
523- string csprojfilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
523+ string csprojfilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
524524 string [ ] Excludes = null ;
525525 IFolderAction folderAction = new FolderAction ( ) ;
526526 IFileOperations fileOperations = new FileOperations ( ) ;
@@ -555,7 +555,7 @@ public void RemoveExcludedComponents_ReturnsUpdatedBom()
555555 //Arrange
556556 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
557557 string outFolder = Path . GetDirectoryName ( exePath ) ;
558- string csprojfilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
558+ string csprojfilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
559559 string [ ] Excludes = null ;
560560
561561 Bom bom = new Bom ( ) ;
@@ -1055,7 +1055,7 @@ public void ParseProjectAssetFile_GivenAInputFilePath_ReturnsSuccess()
10551055 int expectednoofcomponents = 2 ;
10561056 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
10571057 string outFolder = Path . GetDirectoryName ( exePath ) ;
1058- string packagefilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
1058+ string packagefilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
10591059
10601060 string [ ] Includes = { "project.assets.json" } ;
10611061 IFolderAction folderAction = new FolderAction ( ) ;
@@ -1086,7 +1086,7 @@ public void ParseProjectAssetFile_GivenAInputFilePath_ReturnDevDependentComp()
10861086 string IsDev = "true" ;
10871087 string exePath = System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ;
10881088 string outFolder = Path . GetDirectoryName ( exePath ) ;
1089- string packagefilepath = outFolder + @"\ PackageIdentifierUTTestFiles";
1089+ string packagefilepath = Path . GetFullPath ( Path . Combine ( outFolder , " PackageIdentifierUTTestFiles") ) ;
10901090
10911091 string [ ] Includes = { "project.assets.json" } ;
10921092
0 commit comments