Skip to content

Commit

Permalink
IT Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumanth K B committed Oct 17, 2023
1 parent 4694c8f commit 272321a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
24 changes: 15 additions & 9 deletions src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ public void TestComparisionBOMUpdation()
}
}
}

}



Assert.IsTrue(filecheck, "CycloneDx BOM not exist");
}

Expand Down Expand Up @@ -163,11 +159,21 @@ public async Task TestReleaseCreation_ClearingStateAsNewClearing()
string externalid = responseDataForRelease.ExternalIds.Package_Url;

//Assert
Assert.AreEqual(expectedname, name, "Test Project Name");
Assert.AreEqual(expectedversion, version, "Test Project Version");
Assert.AreEqual(expecteddownloadurl, downloadurl, "Test download Url of rxjs");
Assert.AreEqual(expectedexternalid, externalid, "Test component external id");
Assert.AreEqual(expectedclearingState, clearingState);
if (responseData.Embedded.Sw360Releases.Count > 0)
{
//In Case Multiple Releases found just checking for Name & other details.
Assert.AreEqual(expectedname, name, "Test Project Name");
Assert.AreEqual(expecteddownloadurl, downloadurl, "Test download Url of rxjs");
Assert.AreEqual(expectedclearingState, clearingState);
}
else
{
Assert.AreEqual(expectedname, name, "Test Project Name");
Assert.AreEqual(expectedversion, version, "Test Project Version");
Assert.AreEqual(expecteddownloadurl, downloadurl, "Test download Url of rxjs");
Assert.AreEqual(expectedexternalid, externalid, "Test component external id");
Assert.AreEqual(expectedclearingState, clearingState);
}
}


Expand Down
9 changes: 1 addition & 8 deletions src/SW360IntegrationTest/NPM/ComponentCreatorTestMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void TestComparisionBOMUpdation()

foreach (var item in expected.Components)
{

foreach (var i in actual.Components)
{
if ((i.Name == item.Name) && (i.Version == item.Version))
Expand All @@ -100,16 +99,11 @@ public void TestComparisionBOMUpdation()
Assert.AreEqual(item.Purl, component.Purl);
}
}

}

}
Assert.IsTrue(filecheck, "CycloneDx BOM not exist");
}




[Test, Order(3)]
public async Task TestComponentCreation_TestMode()
{
Expand All @@ -120,12 +114,11 @@ public async Task TestComponentCreation_TestMode()
new AuthenticationHeaderValue(TestConstant.TestSw360TokenType, TestConstant.TestSw360TokenValue);

//url formation for retrieving component details
string url = TestConstant.Sw360ComponentApi + TestConstant.componentNameUrl + "rxjs";
string url = TestConstant.Sw360ComponentApi + TestConstant.componentNameUrl + "typescript";
string responseBody = await httpClient.GetStringAsync(url); //GET request
var responseData = JsonConvert.DeserializeObject<ComponentsModel>(responseBody);
//Assert
Assert.IsTrue(responseData.Embedded.Sw360components.Count == 0);

}

private string CCTComparisonBomTestFile { get; set; }
Expand Down

0 comments on commit 272321a

Please sign in to comment.