예제 #1
0
 public CommonWidgetController(IUserQueryService userQueryService
                               , IBlogQueryService blogQueryService
                               , IProblemQueryService problemQueryService)
 {
     _userQueryService = userQueryService;
     _blogQueryService = blogQueryService;
     _problemQueryService = problemQueryService;
 }
예제 #2
0
 public BlogController(
     IProblemQueryService problemQueryService,
     ICommentCommandService commentCommandService,
     IProblemCommandService problemCommandService,
     IBlogQueryService blogQueryService,
     IBlogCommandService blogCommandService,
     IAuthenticationService authenticationService)
 {
     this._problemQueryService = problemQueryService;
     this._commentCommandService = commentCommandService;
     this._problemCommandService = problemCommandService;
     this._blogCommandService = blogCommandService;
     this._blogQueryService = blogQueryService;
     this._authenticationService = authenticationService;
 }
            protected override void Given()
            {
                var serviceProvider =
                    new ServiceCollection()
                    .AddEasyContent(
                        sp => new PostOptions(),
                        sp => new FileProviderOptions())
                    .OverrideWith(
                        serviceCollection =>
                {
                    serviceCollection.Replace(ServiceDescriptor.Singleton(typeof(IFileProviderConfiguration), typeof(TestFileProviderConfiguration)));
                    serviceCollection.Replace(ServiceDescriptor.Singleton(typeof(IPostConfiguration), typeof(TestPostConfiguration)));
                    return(serviceCollection);
                })
                    .BuildServiceProvider();

                _postFilter =
                    new PostFilterBuilder()
                    .Build();

                _sut = serviceProvider.GetService <IBlogQueryService>();
            }
예제 #4
0
 protected override void When()
 {
     _result = _sut.GetService <IBlogQueryService>();
 }
예제 #5
0
 public PostModel(IBlogQueryService blogQueryService)
 {
     _blogQueryService = blogQueryService;
 }
예제 #6
0
 public BlogController(ICommandBus commandBus, IBlogQueryService blogQueryService)
 {
     _commandBus       = commandBus;
     _blogQueryService = blogQueryService;
 }
예제 #7
0
 public IndexModel(IBlogQueryService blogQueryService)
 {
     _blogQueryService = blogQueryService;
 }