Ejemplo n.º 1
0
        public void When_loading_objects_from_assembly_then_they_should_be_accessible()
        {
            var ctx = new CompositionContext();

            ctx.AddPartsFromAssembly(GetType().GetTypeInfo().Assembly);

            var obj = new ImportClass2();

            ctx.SatisfyImports(obj);

            Assert.IsTrue(obj.Object1 != null);
        }
Ejemplo n.º 2
0
        public void When_loading_objects_from_assembly_then_they_should_be_accessible()
        {
            var ctx = new CompositionContext();
            ctx.AddPartsFromAssembly(GetType().GetTypeInfo().Assembly);

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

            Assert.IsTrue(obj.Object1 != null);
        }