Exemple #1
0
        public void When_importing_many_objects_then_a_list_should_be_accessible()
        {
            var ctx = new CompositionContext();

            ctx.AddPart <ExportClass, ExportClass1>();
            ctx.AddPart <ExportClass, ExportClass2>();

            var obj = new ImportManyClass();

            ctx.SatisfyImports(obj);

            Assert.AreEqual(2, obj.Objects.Count());
        }
        public void When_importing_many_objects_then_a_list_should_be_accessible()
        {
            var ctx = new CompositionContext();

            ctx.AddPart<ExportClass, ExportClass1>();
            ctx.AddPart<ExportClass, ExportClass2>();

            var obj = new ImportManyClass();
            ctx.SatisfyImports(obj);

            Assert.AreEqual(2, obj.Objects.Count());
        }