예제 #1
0
        public void LooseImportsOnDerivedPropertiesOverrideImportsOnTheBase()
        {
            var c  = CreateContainer(typeof(Exporter));
            var bi = new BaseImporter();

            c.SatisfyImports(bi);
            var di = new OverridingImporter();

            c.SatisfyImports(di);
            Assert.Equal("a", bi.Imported);
            Assert.Equal("b", di.Imported);
        }
예제 #2
0
 public void LooseImportsOnDerivedPropertiesOverrideImportsOnTheBase()
 {
     var c = CreateContainer(typeof(Exporter));
     var bi = new BaseImporter();
     c.SatisfyImports(bi);
     var di = new OverridingImporter();
     c.SatisfyImports(di);
     Assert.Equal("a", bi.Imported);
     Assert.Equal("b", di.Imported);
 }