Exemple #1
0
        public void CreationFromConfigurationWithAssemblerAttributeSucceds()
        {
            MockConfigurationObjectBase configurationObject
                = new MockConfigurationObjectWithAssemblerAttribute();
            MockAssembledObject createdObject
                = factory.Create(context, configurationObject, configurationSource, reflectionCache);

            Assert.IsNotNull(createdObject);
        }
Exemple #2
0
        public void SecondCreationFromConfigurationWithAssemblerAttributeSuccedsUsingCachedAssembler()
        {
            MockConfigurationObjectBase configurationObject
                = new MockConfigurationObjectWithAssemblerAttribute();
            MockAssembledObject createdObject1
                = factory.Create(context, configurationObject, configurationSource, reflectionCache);
            MockAssembledObject createdObject2
                = factory.Create(context, configurationObject, configurationSource, reflectionCache);

            Assert.IsNotNull(createdObject1);
            Assert.IsNotNull(createdObject2);
            Assert.AreEqual(1, MockAssembler.ConstructorCalls);
        }