public void should_add_conventions_to_result()
        {
            var dispatcher = A.Fake <IDiagnosticMessageDispatcher>();
            var logger     = new DefaultDiagnosticLogger(dispatcher);

            DiagnosticResults result = null;

            A.CallTo(() => dispatcher.Publish(A <DiagnosticResults> ._))
            .Invokes(a => { result = (DiagnosticResults)a.Arguments.First(); });

            logger.ConventionDiscovered(typeof(SomeConvention));
            logger.Flush();

            result.Conventions.ShouldContain(typeof(SomeConvention));
        }
        public void should_add_conventions_to_result()
        {
            var despatcher = Mock <IDiagnosticMessageDespatcher> .Create();

            var logger = new DefaultDiagnosticLogger(despatcher);

            logger.ConventionDiscovered(typeof(SomeConvention));
            logger.Flush();

            DiagnosticResults result = null;

            despatcher.AssertWasCalled(x => x.Publish(Arg <DiagnosticResults> .Is.Anything),
                                       c => c.Callback <DiagnosticResults>(x =>
            {
                result = x;
                return(true);
            }));

            result.Conventions.ShouldContain(typeof(SomeConvention));
        }