public void SelectiveImportBySTM_ExportCollection() { CompositionContainer container = ContainerFactory.Create(); MyImporterWithExportCollectionStronglyTypedMetadata importer; CompositionBatch batch = new CompositionBatch(); batch.AddPart(new MyExporterWithNoMetadata()); batch.AddPart(new MyExporterWithMetadata()); batch.AddPart(importer = new MyImporterWithExportCollectionStronglyTypedMetadata()); Assert.Fail(); //var result = container.TryCompose(); //Assert.IsTrue(result.Succeeded, "Collection import should be successful in anyway"); //Assert.AreEqual(1, result.Issues.Count, "There should be an issue reported about the export with no required metadata"); //Assert.AreEqual(1, importer.ValueInfoCol.Count, "There should be only one export got bound"); //Assert.AreEqual("Bar", importer.ValueInfoCol.First().Metadata.Foo, "The value of metadata 'Foo' should be 'Bar'"); }
public void SelectiveImportBySTM_ExportCollection() { CompositionContainer container = ContainerFactory.Create(); MyImporterWithExportCollectionStronglyTypedMetadata importer; CompositionBatch batch = new CompositionBatch(); batch.AddPart(new MyExporterWithNoMetadata()); batch.AddPart(new MyExporterWithMetadata()); batch.AddPart(importer = new MyImporterWithExportCollectionStronglyTypedMetadata()); throw new NotImplementedException(); //var result = container.TryCompose(); //Assert.True(result.Succeeded, "Collection import should be successful in anyway"); //Assert.Equal(1, result.Issues.Count); //Assert.Equal(1, importer.ValueInfoCol.Count); //Assert.Equal("Bar", importer.ValueInfoCol.First().Metadata.Foo); }
public void SelectiveImportBySTM_ExportCollection() { CompositionContainer container = ContainerFactory.Create(); MyImporterWithExportCollectionStronglyTypedMetadata importer; CompositionBatch batch = new CompositionBatch(); batch.AddPart(new MyExporterWithNoMetadata()); batch.AddPart(new MyExporterWithMetadata()); batch.AddPart(importer = new MyImporterWithExportCollectionStronglyTypedMetadata()); Assert.Fail(); //var result = container.TryCompose(); //Assert.IsTrue(result.Succeeded, "Collection import should be successful in anyway"); //Assert.AreEqual(1, result.Issues.Count, "There should be an issue reported about the export with no required metadata"); //Assert.AreEqual(1, importer.ValueInfoCol.Count, "There should be only one export got bound"); //Assert.AreEqual("Bar", importer.ValueInfoCol.First().Metadata.Foo, "The value of metadata 'Foo' should be 'Bar'"); }