public void should_add_skipped_automap_types_to_result()
        {
            var despatcher = Mock <IDiagnosticMessageDespatcher> .Create();

            var logger = new DefaultDiagnosticLogger(despatcher);

            logger.AutomappingSkippedType(typeof(object), "reason");
            logger.Flush();

            DiagnosticResults result = null;

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

            result.AutomappingSkippedTypes
            .ShouldContain(new SkippedAutomappingType
            {
                Type   = typeof(object),
                Reason = "reason"
            });
        }
        public void should_add_skipped_automap_types_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.AutomappingSkippedType(typeof(object), "reason");
            logger.Flush();

            result.AutomappingSkippedTypes
            .ShouldContain(new SkippedAutomappingType
            {
                Type   = typeof(object),
                Reason = "reason"
            });
        }