public void ImportSingleToInternal() { var container = ContainerFactory.Create(); var importer = new Int32ImporterInternal(); var exporter = new Int32Exporter(42); CompositionBatch batch = new CompositionBatch(); batch.AddPart(importer); batch.AddPart(exporter); container.Compose(batch); Assert.AreEqual(42, importer.Value, "Expecting value to be imported"); }
public void ImportSingleToInternal() { var container = ContainerFactory.Create(); var importer = new Int32ImporterInternal(); var exporter = new Int32Exporter(42); CompositionBatch batch = new CompositionBatch(); batch.AddPart(importer); batch.AddPart(exporter); container.Compose(batch); Assert.Equal(42, importer.Value); }