feat(transport): restore composition + alarm-script edges on bundle import
This commit is contained in:
@@ -221,10 +221,14 @@ public sealed class RoundTripTests : IDisposable
|
||||
.Include(t => t.Compositions)
|
||||
.SingleAsync(t => t.Name == "Pump");
|
||||
Assert.Equal("composes BaseDevice", pump.Description);
|
||||
// Composition edges intentionally NOT restored by the v1 import
|
||||
// (see BundleImporter.BuildTemplate XML comment). Round-trip's
|
||||
// field-level identity holds; rebuilding the composition graph
|
||||
// belongs to a follow-up task.
|
||||
// FU-B / #39 — composition graph IS restored on import. The bundle
|
||||
// carried Pump composing BaseDevice via InstanceName="base"; the
|
||||
// importer's second pass (ResolveCompositionEdgesAsync) re-resolved
|
||||
// ComposedTemplateName to BaseDevice's new id after the template
|
||||
// flush and re-added the row.
|
||||
var pumpComp = Assert.Single(pump.Compositions);
|
||||
Assert.Equal("base", pumpComp.InstanceName);
|
||||
Assert.Equal(baseDevice.Id, pumpComp.ComposedTemplateId);
|
||||
|
||||
var standalone = await ctx.Templates.SingleAsync(t => t.Name == "Standalone");
|
||||
Assert.Equal("no deps", standalone.Description);
|
||||
|
||||
Reference in New Issue
Block a user