/// <summary>
        /// initializes existing profanity list.
        /// </summary>
        public ProfanityServiceBase(IProfanityWord profanityDataService)
        {
            _profanityDataService = profanityDataService;
            var result = _profanityDataService.GetProfanityByLanguageAsync(Data.Entities.Language.EN).Result;

            if (result != null)
            {
                _profanities = result.ProfanityWord;
            }
        }
Esempio n. 2
0
        public async Task GetProfanityByLanguageAsync_Should_Workd()
        {
            var response = await profanityword.GetProfanityByLanguageAsync(Language.EN);

            Assert.That(() => response, Throws.Nothing);
        }
        public async Task <List <string> > GetAllProfanitiesAsync(Language language)
        {
            var profanityDTO = await _profanityDataService.GetProfanityByLanguageAsync(language);

            return(profanityDTO?.ProfanityWord);
        }