fix: parse project rosters with legacy-compatible semantics
This commit is contained in:
@@ -70,14 +70,15 @@ public sealed class LegacyProductSelectionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProductIncompatibleAndDuplicateIds_AreBlocked()
|
||||
public void ProductIncompatibleIds_AreBlocked_AndDuplicateIdsRemainDiagnosticInput()
|
||||
{
|
||||
using var fixture = new SelectionFixture();
|
||||
var project = fixture.ProjectFile("Project.xml");
|
||||
fixture.WriteAutomatic("Plant PnID_2019", "<root><id>unexpected</id></root>");
|
||||
Assert.Equal("LEGACY_PLUGIN_PRODUCT_MISMATCH", Assert.Throws<InvalidOperationException>(() => LegacyProductSelections.ReadRoster(LegacyProductSelections.Pnid, project, null, new LegacyConfigurationAdapter())).Message);
|
||||
fixture.WriteAutomatic("Plant PnID_2019", "<root><id>1111</id><id>1111</id></root>");
|
||||
Assert.Equal("LEGACY_DOWNLOAD_SELECTION_INVALID", Assert.Throws<InvalidOperationException>(() => LegacyProductSelections.ReadRoster(LegacyProductSelections.Pnid, project, null, new LegacyConfigurationAdapter())).Message);
|
||||
var duplicatePlan = LegacyProductSelections.ReadRoster(LegacyProductSelections.Pnid, project, null, new LegacyConfigurationAdapter());
|
||||
Assert.Equal(["1111", "1111"], duplicatePlan.OrderedIds);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user