コード例 #1
0
ファイル: DiscoveryTests.cs プロジェクト: nlhepler/mono
        public void Import_StaticImport_ShouldNotBeSet()
        {
            var container = ContainerFactory.Create();
            container.AddAndComposeExportedValue("StaticImport", "String that shouldn't be imported");

            var importer = new ClassWithStaticImport();

            container.SatisfyImportsOnce(importer);

            Assert.IsNull(ClassWithStaticImport.MyImport, "Static import should not have been set!");
        }
コード例 #2
0
        public void Import_StaticImport_ShouldNotBeSet()
        {
            var container = ContainerFactory.Create();

            container.AddAndComposeExportedValue("StaticImport", "String that shouldn't be imported");

            var importer = new ClassWithStaticImport();

            container.SatisfyImportsOnce(importer);

            Assert.IsNull(ClassWithStaticImport.MyImport, "Static import should not have been set!");
        }