private static void AssertTranslationExists(IEnumerable <string> ids, string category) { var service = new DefaultLocalizationService(); var notFoundLocalizations = new List <string>(); foreach (var id in ids) { var localizedString = service.GetString(category, id); if (string.IsNullOrEmpty(localizedString)) { var errormsg = string.Format("Could not find localization of Id '{0}' ", id); notFoundLocalizations.Add(errormsg); } else { Assert.NotEqual("", localizedString.Trim()); } } if (notFoundLocalizations.Any()) { var concated = notFoundLocalizations.Aggregate((x, y) => x + ", " + y); throw new AssertActualExpectedException("Some translation", "NOTHING!", concated); } }
public LocaleOptions() { FallbackLocalizationService = new DefaultLocalizationService(); }