예제 #1
0
        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);
        }
예제 #2
0
파일: RoadsService.cs 프로젝트: Jos1k/Roads
 /// <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>();
     }
 }