public void DualBoundaryPartAccessibleViaTwoBoundariesAtOnce(IContainer container) { BoundaryFactory root = container.GetExportedValue <BoundaryFactory>(); PartImportingFromBothBoundaries dualBoundaryPart = root.DualBoundaryPartFactory.CreateExport().Value; Assert.NotNull(dualBoundaryPart); Assert.NotNull(dualBoundaryPart.Boundary1Value); Assert.NotNull(dualBoundaryPart.Boundary2Value); }
public void DualBoundaryPartAccessibleViaOneBoundaryAtATime(IContainer container) { BoundaryFactory root = container.GetExportedValue <BoundaryFactory>(); Boundary1Part boundary1Part = root.Boundary1Factory.CreateExport().Value; Boundary2Part boundary2Part = boundary1Part.Boundary2Factory.CreateExport().Value; PartImportingFromBothBoundaries dualBoundaryPart = boundary2Part.DualBoundaryPart; Assert.NotNull(dualBoundaryPart); Assert.Same(boundary2Part, dualBoundaryPart.Boundary2Value); Assert.Same(boundary1Part, dualBoundaryPart.Boundary1Value); }