public GetLanguageByName ( string name ) : |
||
name | string | |
Résultat |
public void mkvmergelanguageservice_returns_correct_language_test() { //given IJsonSerializationService<ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService<ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); //when var language = service.GetLanguageByName("English"); //then language.Value.Should().Be("eng"); }
public void mkvmergelanguageservice_returns_undetermined_when_language_not_found_test() { //given IJsonSerializationService<ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService<ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); //when var language = service.GetLanguageByName("nolanguage"); //then language.Value.Should().Be("und"); }
private void LoadMKVMergeLangugeItemsDropDown() { IJsonSerializationService<ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService<ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); foreach (MKVMergeLanguageItem item in service.GetLanguages()) { _bindingListMKVMergeLanguageItem.Add(item); } bsMKVMergeLanguageItem.DataSource = _bindingListMKVMergeLanguageItem; _bindingListMKVMergeLanguageItem.AllowEdit = false; if (_isAdd) { _currentMKVMergeItem.Language = service.GetLanguageByName("undetermined"); } }