Ejemplo n.º 1
0
        public void CanGetCustomFactoryForAnnotatedTypeTheFirstTime()
        {
            MockImplementor.constructorCalls = 0;
            ICustomFactory factory = cache.GetCustomFactory(typeof(TypeWithCustomFactoryAttribute));

            Assert.IsNotNull(factory);
            Assert.AreSame(typeof(MockImplementor), factory.GetType());
            Assert.AreEqual(1, MockImplementor.constructorCalls);
        }