public ActionResult Other()
        {
            var someOtherService = new SomeOtherService();

            someOtherService.DoSomething();
            return(Json(true));
        }
예제 #2
0
    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;
 }
예제 #5
0
 public AService(SomeOtherService otherService)
 {
     this.OtherService = otherService;
 }
예제 #6
0
 public AService(SomeOtherService otherService)
 {
     this.OtherService = otherService;
 }