private void SetupContext(TestingContext context) { context.AddPrincipalMock(); context.AddBinaryServiceMock(); context.AddInMemoryDb(); context.AddLogServiceMock(); context.AddCacheService(); }
private void InitContext(TestingContext context) { context.AddPrincipalMock(); context.AddInMemoryDb(); context.AddMockLogService(); context.AddGermanCultureServiceMock(); context.AddBinaryServiceMock(); context.AddCacheService(); context.DependencyMap[typeof(ICommentsService)] = context.GetService <CommentsService>(); context.DependencyMap[typeof(ITagService)] = context.GetService <TagService>(); }
private void SetUpTestingContext(TestingContext testingContext) { testingContext.AddPrincipalMock(); testingContext.AddInMemoryDb(); testingContext.AddUserService(); testingContext.AddBusinessSecurityService(); testingContext.AddLogServiceMock(); testingContext.AddGermanCultureServiceMock(); testingContext.AddBinaryServiceMock(); testingContext.AddInfoTextServiceMock(); testingContext.AddCacheService(); testingContext.DependencyMap[typeof(ICommentsService)] = testingContext.GetService <CommentsService>(); testingContext.DependencyMap[typeof(ITagService)] = testingContext.GetService <TagService>(); Mock <INotificationService> notificationMock = new Mock <INotificationService>(MockBehavior.Loose); notificationMock.Setup(x => x.SendNotificationAboutQuestionAsync(It.IsAny <int>(), It.IsAny <string>(), It.IsAny <string>())) .Returns(Task.CompletedTask); testingContext.DependencyMap[typeof(INotificationService)] = notificationMock.Object; }