public TestController(
     ITopicAppService topicAppService,
     ITestAppService testAppService)
 {
     _topicAppService = topicAppService;
     _testAppService  = testAppService;
 }
        public void SetupContext()
        {
            _mockPosts      = new Mock <IRepository <Post> >();
            _mockComments   = new Mock <IRepository <Comment> >();
            _mockUnitOfWork = new Mock <IUnitOfWork>();
            _mockValidator  = new Mock <IDtoModelsValidator>();
            _mockValidator.Setup(m => m.GetCommentDtoValidationErrors(It.IsAny <CommentDto>()))
            .Returns(new List <(string, string)>(0));
            _mockValidator.Setup(m => m.GetPostDtoValidationErrors(It.IsAny <PostDto>()))
            .Returns(new List <(string, string)>(0));
            _mockUnitOfWork.Setup(m => m.Posts).Returns(_mockPosts.Object);
            _mockUnitOfWork.Setup(m => m.Comments).Returns(_mockComments.Object);

            _manager = new PostsAndCommentsManager(_mockUnitOfWork.Object, _mockValidator.Object);
        }
示例#3
0
 public TransTestAppService(ITestAppService testAppService)
 {
     _testAppService = testAppService;
 }
 public HomeController(ITestAppService testAppService)
 {
     _testAppService = testAppService;
 }
示例#5
0
 public TestAppServiceTest()
 {
     _testAppService = GetRequiredService <ITestAppService>();
 }
 public ClientDemoService(IProfileAppService profileAppService, ITestAppService testAppService)
 {
     _profileAppService = profileAppService;
     _testAppService    = testAppService;
 }
示例#7
0
 public TestProxyAppService(ITestAppService testAppService,
                            ICurrentServiceKey currentServiceKey)
 {
     _testAppService    = testAppService;
     _currentServiceKey = currentServiceKey;
 }
示例#8
0
 public CommentsController(ITestAppService service)
 {
     _appService = service;
 }
示例#9
0
 public AnotherAppService(ITestAppService testAppService)
 {
     _testAppService = testAppService;
 }
示例#10
0
 public PostsController(ITestAppService service)
 {
     _appService = service;
 }
 public IndexModel(ITestAppService testAppService)
 {
     _testAppService = testAppService;
 }
示例#12
0
 public CallerAppService(ITestAppService testAppService)
 {
     _testAppService = testAppService;
 }