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); }
/// <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)); }