コード例 #1
0
        public void MefInstanceCount2Test()
        {
            CountableMefComponent.ResetInstanceCount();
            IUnityContainer container = ConfigureMefThenUnity();
            var             countable = container.Resolve <ICountableMefComponent>();

            Assert.AreEqual(1, countable.InstanceCount);
        }
コード例 #2
0
        public void MefInstanceCountTest()
        {
            CountableMefComponent.ResetInstanceCount();
            IAutofacContainer container = ConfigureAutofacThenMef();
            var countable = container.Resolve <ICountableMefComponent>();

            Assert.AreEqual(1, countable.InstanceCount);
        }