Пример #1
0
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            //get new data from the UI
            int selectedIndex = stationsListBox.SelectedIndex;

            //Update the information in the radio
            _radio.UpdateChannelData(stationsListBox.SelectedItem, nameTextBox.Text.Trim(), urlTextBox.Text.Trim());

            //refresh the ui to have the updata in it
            _mainWindow.ReloadStations();
            PopulateListBox();
            stationsListBox.SelectedIndex = selectedIndex;

            _mainWindow.RefreshUI();

            MessageBox.Show("Changes Saved", "Radio");
        }
Пример #2
0
 public void UpdateStation_ThatDoesNotExistInSystem()
 {
     Assert.That(() => _radio.UpdateChannelData(IStreamable.IStreamableBasicConstructor(), "newName", "newUrl"), Throws.Exception.With.Message.EqualTo("The old station entry could not be found"));
 }