public ActionResult Other() { var someOtherService = new SomeOtherService(); someOtherService.DoSomething(); return(Json(true)); }
public void LogsErrorWhenInputIsZero() { var mockLogger = new Mock <ILoggerAdapter <SomeOtherService> >(); var someOtherService = new SomeOtherService(mockLogger.Object); someOtherService.DoSomething(0); mockLogger.Verify(l => l.LogError(It.IsAny <Exception>(), It.IsAny <string>(), 0)); }