stabilizaiton work - projects rework for maintenanceability and ui livening

This commit is contained in:
master
2026-02-03 23:40:04 +02:00
parent 074ce117ba
commit 557feefdc3
3305 changed files with 186813 additions and 107843 deletions

View File

@@ -0,0 +1,32 @@
// <copyright file="ModelExternalIdentifierTests.cs" company="StellaOps">
// Copyright (c) StellaOps. Licensed under the BUSL-1.1.
// </copyright>
using StellaOps.Spdx3.Model;
namespace StellaOps.Spdx3.Tests;
[Trait("Category", "Unit")]
[Trait("Intent", "Operational")]
public sealed class ModelExternalIdentifierTests
{
[Fact]
public void ExternalIdentifierExtensions_GetPurl_Works()
{
var identifiers = new[]
{
new Spdx3ExternalIdentifier
{
ExternalIdentifierType = Spdx3ExternalIdentifierType.PackageUrl,
Identifier = "pkg:npm/lodash@4.17.21"
},
new Spdx3ExternalIdentifier
{
ExternalIdentifierType = Spdx3ExternalIdentifierType.Cpe23,
Identifier = "cpe:2.3:a:lodash:lodash:4.17.21:*:*:*:*:*:*:*"
}
};
Assert.Equal("pkg:npm/lodash@4.17.21", identifiers.GetPurl());
Assert.Equal("cpe:2.3:a:lodash:lodash:4.17.21:*:*:*:*:*:*:*", identifiers.GetCpe23());
}
}