public ActionResult Other() { var someOtherService = new SomeOtherService(); someOtherService.DoSomething(); return(Json(true)); }
public Response DoSomething(string projectId) { string baseUrl = SomeOtherService.GetBaseUrlByProjectId(projectId); var client = _factory.CreateClient(baseUrl); return(client.GetQuestionsAsync(projectId)); }
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)); }
public HomeController( SomeOtherService baseService, ISingletonService singletonService, ITransientService transientService, IScopedService scopedService) { _singletonService = singletonService; _transientService = transientService; _scopedService = scopedService; _baseService = baseService; }
public AService(SomeOtherService otherService) { this.OtherService = otherService; }