Skip to content

Commit

Permalink
UT Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumanth K B committed Oct 18, 2023
1 parent 0f4cf4d commit f044d42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions src/SW360IntegrationTest/NPM/ComponentCreatorInitial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,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
2 changes: 1 addition & 1 deletion src/SW360IntegrationTest/NPM/ComponentCreatorTestMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ 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
Expand Down

0 comments on commit f044d42

Please sign in to comment.