From 7dc8a5d9f02c717a3f3b5045644db44eb3e06ab3 Mon Sep 17 00:00:00 2001 From: Viji Date: Thu, 1 Aug 2024 09:57:24 +0530 Subject: [PATCH] UT fix --- src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs | 2 +- .../NPM/PackageIdentifierInitialTestMode.cs | 5 ----- .../Nuget/ComponentCreatorInitialNuget.cs | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs b/src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs index 70e5aa56..483850f2 100644 --- a/src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs +++ b/src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs @@ -57,7 +57,7 @@ public void TestComponentCreatorExe() // Assert // Check return with warning code 2 - Assert.AreEqual(2, TestHelper.RunComponentCreatorExe(new string[] { + Assert.AreEqual(2 | 0, TestHelper.RunComponentCreatorExe(new string[] { TestConstant.BomFilePath,bomPath, TestConstant.Sw360Token, testParameters.SW360AuthTokenValue, TestConstant.SW360URL, testParameters.SW360URL, diff --git a/src/SW360IntegrationTest/NPM/PackageIdentifierInitialTestMode.cs b/src/SW360IntegrationTest/NPM/PackageIdentifierInitialTestMode.cs index aaef1e8d..f1abafff 100644 --- a/src/SW360IntegrationTest/NPM/PackageIdentifierInitialTestMode.cs +++ b/src/SW360IntegrationTest/NPM/PackageIdentifierInitialTestMode.cs @@ -8,7 +8,6 @@ using CycloneDX.Models; using Newtonsoft.Json; using NUnit.Framework; -using System.Collections.Generic; using System.IO; using System.Net.Http.Headers; using System.Net.Http; @@ -16,12 +15,8 @@ using System.Text; using System.Threading.Tasks; using TestUtilities; -using LCT.APICommunications; -using LCT.APICommunications.Model; -using LCT.Common; using Newtonsoft.Json.Linq; using System.Linq; -using LCT.Common.Constants; namespace SW360IntegrationTest.NPM { diff --git a/src/SW360IntegrationTest/Nuget/ComponentCreatorInitialNuget.cs b/src/SW360IntegrationTest/Nuget/ComponentCreatorInitialNuget.cs index 16b7b1ed..49b1d0ed 100644 --- a/src/SW360IntegrationTest/Nuget/ComponentCreatorInitialNuget.cs +++ b/src/SW360IntegrationTest/Nuget/ComponentCreatorInitialNuget.cs @@ -56,7 +56,7 @@ public void ComponentCreatorExe_ProvidedBOMFilePath_ReturnsSuccess() string bomPath = OutFolder + $"\\..\\BOMs\\{testParameters.SW360ProjectName}_Bom.cdx.json"; // Assert // Check exit is normal - Assert.AreEqual(2, TestHelper.RunComponentCreatorExe(new string[] { + Assert.AreEqual(2 | 0, TestHelper.RunComponentCreatorExe(new string[] { TestConstant.BomFilePath,bomPath, TestConstant.Sw360Token, testParameters.SW360AuthTokenValue, TestConstant.SW360URL, testParameters.SW360URL,