public void GetRegionsForSelectList_SentLanguageName_Get_ListOfTranslations(string name, int count) { //arrange var repository = new MapObjectTranslationsRepository(_datacontext); var manager = new MapObjectManager(repository); //act var result = manager.GetRegionsForSelectList(name); //assert Assert.AreEqual(result.Count, count); }
/// <summary> /// Gets the regions list for language. /// </summary> /// <param name="languageName">Name of the language.</param> /// <returns>The list of <see cref="ObjectTranslationsData"/>.</returns> public List<ObjectTranslationsData> GetRegionsListForLanguage(string languageName) { try { using (var manager = new MapObjectManager()) { return manager.GetRegionsForSelectList(languageName); } } catch (Exception ex) { //TODO ADD tracking return new List<ObjectTranslationsData>(); } }