public PostsController(PostServices postServices,TagServices tagService ,CommentServices commentService,AppConfiguration config) { this.postServices = postServices; this.commentService = commentService; this.tagService = tagService; this.config = config; }
public MetaWeblogAPI() { try { postServices = ObjectFactory.GetInstance<PostServices>(); userServices = ObjectFactory.GetInstance<UserServices>(); tagServices = ObjectFactory.GetInstance<TagServices>(); } catch { Debug.WriteLine(ObjectFactory.WhatDoIHave()); throw; } }
public void SetupMocks() { var serviceMock = new MoqAutoMocker<PostServices>(); postRepositoryMock = Mock.Get(serviceMock.Get<IPostRepository>()); appConfigProviderMock = Mock.Get(serviceMock.Get<IAppConfigProvider>()); tagRepositoryMock = Mock.Get(serviceMock.Get<ITagRepository>()); SetupPostRepositoryMock(postRepositoryMock); SetupTagRepositoryMock(tagRepositoryMock); SetupAppConfigProviderMock(appConfigProviderMock); service = serviceMock.ClassUnderTest; _AddedPost = null; }
public HomeController(PostServices postService, AppConfiguration config,ILog logger) : base(logger) { this.postService = postService; }
public WidgetController(PostServices postService, AppConfiguration config, ILog logger) : base(logger) { this.postService = postService; this.config = config; }