Skip to content

Commit 6074f55

Browse files
committed
test: update tests
1 parent 16ad5cb commit 6074f55

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

Fossology.Rest.Dotnet.Test/FossologyClientTest.cs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class FossologyClientTest
4545
/// <summary>
4646
/// The access token.
4747
/// </summary>
48-
private const string Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2Nzk3MDIzOTksIm5iZiI6MTY3OTM1NjgwMCwianRpIjoiTXk0eiIsInNjb3BlIjoid3JpdGUifQ.LAM8QI2o1zry1PbyxHCqmNYr45jDPFzadH7FNm1L-CQ";
48+
private const string Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3Mjk2NDE1OTksIm5iZiI6MTcyOTI5NjAwMCwianRpIjoiTWk0eiIsInNjb3BlIjoid3JpdGUifQ.XDoC_pByw2RaxJFO_F-PM7zrJlCIyu1G3UyD3_7QeQ4";
4949

5050
/// <summary>
5151
/// The filename of a test package.
@@ -524,13 +524,25 @@ public void TestGetUploadCopyrights()
524524
Assert.IsNotNull(copyrights);
525525

526526
Assert.AreEqual(10, copyrights.Count);
527-
Assert.AreEqual(
528-
"copyright owner or by an individual or Legal Entity authorized to submit on behalf of",
529-
copyrights[0].Copyright);
530527
Assert.AreEqual(1, copyrights[0].FilePath.Count);
531-
Assert.AreEqual(
532-
"Tethys.xml_v1.0.0.zip/Tethys.Xml-1.0.0/LICENSE",
533-
copyrights[0].FilePath[0]);
528+
if (copyrights[0].FilePath[0].Contains("LICENSE"))
529+
{
530+
Assert.AreEqual(
531+
"Tethys.xml_v1.0.0.zip/Tethys.Xml-1.0.0/LICENSE",
532+
copyrights[0].FilePath[0]);
533+
Assert.AreEqual(
534+
"copyright owner or by an individual or Legal Entity authorized to submit on behalf of",
535+
copyrights[0].Copyright);
536+
}
537+
else
538+
{
539+
Assert.AreEqual(
540+
"copyright file=\"AssemblyInfo.cs\" company=\"Tethys\">",
541+
copyrights[0].Copyright);
542+
Assert.AreEqual(
543+
"Tethys.xml_v1.0.0.zip/Tethys.Xml-1.0.0/Tethys.Xml/Properties/AssemblyInfo.cs",
544+
copyrights[0].FilePath[0]);
545+
} // if
534546
}
535547

536548
/// <summary>

0 commit comments

Comments
 (0)