private void CRUD_Delete_HttpGet_Null_ID() { var fakeHttpCodeResult = testController.Delete(null) as HttpStatusCodeResult; Assert.NotNull(fakeHttpCodeResult); Assert.Equal(400, fakeHttpCodeResult.StatusCode); }
private void Delete_Click(object sender, RoutedEventArgs e) { if (Icon.Source != null) { path = Icon.Source.ToString(); } else { path = string.Empty; } controller.Radio = new Radio(Name.Text, URL.Text, path); controller.Delete(); Name.Text = string.Empty; URL.Text = string.Empty; Icon.Source = null; bassController.Radios.Remove(controller.Radio); //bassController.UpdateRadioList(); //RadioStation.ItemsSource = bassController.Radios; }