public void SetUp()
        {
            _mockRepository = new MockRepository();

            _typeAnalyzerMock     = _mockRepository.StrictMock <IMixinDeclarationAnalyzer <Type> > ();
            _assemblyAnalyzerMock = _mockRepository.StrictMock <IMixinDeclarationAnalyzer <Assembly> > ();

            _fakeConfigurationBuilder = _mockRepository.Stub <MixinConfigurationBuilder> ((MixinConfiguration)null);
        }
        /// <summary>
        /// Analyzes the information added so far to this builder and creates a new <see cref="MixinConfiguration"/> from that data.
        /// </summary>
        /// <returns>An <see cref="MixinConfiguration"/> derived from the configuration specified in the builder's constructor containing
        /// <see cref="ClassContext"/> and <see cref="MixinContext"/> objects based on the information added so far.</returns>
        public MixinConfiguration BuildConfiguration()
        {
            s_log.InfoFormat("Building mixin configuration from {0} types.", _allTypes.Count);

            using (StopwatchScope.CreateScope(s_log, LogLevel.Info, "Time needed to build mixin configuration: {elapsed}."))
            {
                var typeAnalyzers     = new IMixinDeclarationAnalyzer <Type>[] { CreateAttributeAnalyzer <Type>(), new HasComposedInterfaceMarkerAnalyzer() };
                var assemblyAnalyzers = new IMixinDeclarationAnalyzer <Assembly>[] { CreateAttributeAnalyzer <Assembly> () };

                var configurationAnalyzer = new DeclarativeConfigurationAnalyzer(typeAnalyzers, assemblyAnalyzers);

                var configurationBuilder = new MixinConfigurationBuilder(_parentConfiguration);
                configurationAnalyzer.Analyze(_allTypes, configurationBuilder);
                return(configurationBuilder.BuildConfiguration());
            }
        }