public void LogAction_should_log_with_format_string()
        {
            var helper = new ActionLogHelper(_loggerMock.Object);

            const string prefix = "pre";

            var controllerDescriptor = new HttpControllerDescriptor {ControllerType = typeof (ActionLogHelper)};
            var actionDescriptor = new ReflectedHttpActionDescriptor {ControllerDescriptor = controllerDescriptor};

            helper.LogAction(actionDescriptor, prefix);

            _loggerMock.Verify(x => x.DebugFormat(ActionLogHelper.LogTextFormatString, prefix, typeof(ActionLogHelper).FullName, null));
        }
Beispiel #2
0
        public void LogAction_should_log_with_format_string()
        {
            var helper = new ActionLogHelper(_loggerMock.Object);

            const string prefix = "pre";

            var controllerDescriptor = new HttpControllerDescriptor {
                ControllerType = typeof(ActionLogHelper)
            };
            var actionDescriptor = new ReflectedHttpActionDescriptor {
                ControllerDescriptor = controllerDescriptor
            };

            helper.LogAction(actionDescriptor, prefix);

            _loggerMock.Verify(x => x.DebugFormat(ActionLogHelper.LogTextFormatString, prefix, typeof(ActionLogHelper).FullName, null));
        }