Пример #1
0
        public void ImportCsvBadData()
        {
            _localizationRepositorySub.GetLanguageByLanguageCulture("fr-FR").Returns(x => null);

            var report = _localizationService.FromCsv("fr-FR", null);

            Assert.AreEqual(report.Errors.Count, 1);
            Assert.AreEqual(report.Errors[0].ErrorWarningType, CsvErrorWarningType.BadDataFormat);
        }
Пример #2
0
 /// <summary>
 /// Retrieve a language by the language-culture string e.g. "en-GB"
 /// </summary>
 /// <param name="languageCulture"></param>
 public Language GetLanguageByLanguageCulture(string languageCulture)
 {
     return(_localizationRepository.GetLanguageByLanguageCulture(languageCulture));
 }