Skip to content

Commit

Permalink
Merge pull request #226 from siemens/feature/NewAppSettingsforAllExcs
Browse files Browse the repository at this point in the history
Package identifier changes for the new app settings
  • Loading branch information
adityanarayanp authored Jan 24, 2025
2 parents 23b8352 + 8370f95 commit aac6ac9
Show file tree
Hide file tree
Showing 42 changed files with 1,710 additions and 904 deletions.
5 changes: 4 additions & 1 deletion src/LCT.Common.UTests/CommonHelperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,20 @@ public void RemoveMultipleExcludedComponents_ReturnSuccess()
ComponentsForBom.Add(new Component() { Name = "Debian", Version = "3.1.2" });
ComponentsForBom.Add(new Component() { Name = "Newton", Version = "3.1.3" });
ComponentsForBom.Add(new Component() { Name = "Log4t", Version = "3.1.4" });
ComponentsForBom.Add(new Component() { Name = "Log4t", Version = "3.1.5",Purl= "pkg:npm/[email protected]" });
ComponentsForBom.Add(new Component() { Name = "Log4t", Version = "3.1.5", Purl = "pkg:npm/[email protected]" });
int noOfExcludedComponents = 0;

List<string> list = new List<string>();
list.Add("Debian:*");
list.Add("Newton:3.1.3");
list.Add("pkg:npm/[email protected]");

//Act
CommonHelper.RemoveExcludedComponents(ComponentsForBom, list, ref noOfExcludedComponents);

//Assert
Assert.That(noOfExcludedComponents, Is.EqualTo(4), "Returns the count of excluded components");
Assert.That(noOfExcludedComponents, Is.EqualTo(5), "Returns the count of excluded components");

}

Expand Down
4 changes: 2 additions & 2 deletions src/LCT.Common.UTests/FolderActionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public void CopyToTargetDirectory_PassingDirsWithFiles_ReturnSuccess()
{
//Arrange
string sourcePath = $"{Path.GetTempPath()}\\SampleFolder";
Directory.CreateDirectory(sourcePath);
Directory.CreateDirectory(sourcePath +"\\SampleSubFolder");
System.IO.Directory.CreateDirectory(sourcePath);
System.IO.Directory.CreateDirectory(sourcePath +"\\SampleSubFolder");
File.WriteAllText(sourcePath + "\\Sample.txt", "");
string targetPath = $"{Path.GetTempPath()}/targetPath/";
var folderAction = new FolderAction();
Expand Down
Loading

0 comments on commit aac6ac9

Please sign in to comment.