private void InitializeSortedCountries() { _sortedCountries = Substitute.For <ISortedCountries>(); _countries = new List <string> { "IT", "CH", "SE", "IS", "US", "FR" }; _sortedCountries.List().Returns(_countries); }
private ObservableCollection <IServerListItem> CreateCountryList() { List <string> countries = _sortedCountries.List(); User user = _userStorage.User(); ObservableCollection <IServerListItem> list = new ObservableCollection <IServerListItem>(); foreach (string country in countries) { string name = Countries.GetName(country); if (string.IsNullOrEmpty(name)) { continue; } list.Add(new ServersByCountryViewModel(country, user.MaxTier, _serverManager, _vpnState)); } return(list); }