public ConceptValidationServiceTest() { _statusRepository = A.Fake <IStatusRepository>(); _metadataRepository = A.Fake <IMetadataRepository>(); _categoryRepository = A.Fake <ICategoryRepository>(); _mediaTypeRepository = A.Fake <IMediaTypeRepository>(); _defaultLanguage = "nb"; var languageConfig = new OptionsWrapper <LanguageConfig>(ConfigHelper.GetLanguageConfiguration()); _validationService = new ConceptValidationService(_statusRepository, _metadataRepository, _categoryRepository, _mediaTypeRepository, languageConfig); }
public BaseAttributeTest() { ServiceProvider = A.Fake <IServiceProvider>(); ValidationService = A.Fake <IConceptValidationService>(); HttpContextAccessor = A.Fake <IHttpContextAccessor>(); HttpContext = new DefaultHttpContext(); ValidationContext = new ValidationContext(new object(), ServiceProvider, null); A.CallTo(() => HttpContextAccessor.HttpContext).Returns(HttpContext); A.CallTo(() => ServiceProvider.GetService(typeof(IConceptValidationService))).Returns(ValidationService); A.CallTo(() => ServiceProvider.GetService(typeof(IHttpContextAccessor))).Returns(HttpContextAccessor); }