コード例 #1
0
ファイル: MetadataTests.cs プロジェクト: pmq20/mono_forked
        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'");
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: MetadataTests.cs プロジェクト: nlhepler/mono
        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'");
        }