public void RecuperarMagistralTest() { Magistral_Logica magistral_Logica = new Magistral_Logica(); List <Magistral> listaRecibida = magistral_Logica.RecuperarMagistral(); List <Magistral> listaEsperada = new List <Magistral>(); listaEsperada.Add(new Magistral() { Id = 2, nombre = "Herendira", apellidoPaterno = "Joaquines", apellidoMaterno = "Gutierrez", AdscripcionId = 1 }); listaRecibida.Should().BeEquivalentTo(listaEsperada); }
private void LlenarComboBox() { Magistral_Logica magistral_Logica = new Magistral_Logica(); if (!magistral_Logica.ComprobarConexion()) { textBlock_mensaje.Text = String.Empty; var bold = new Bold( new Run("Se ha perdido conexión con la base de datos") { Foreground = Brushes.Red }); textBlock_mensaje.Inlines.Add(bold); } else { this.listaMagistral = magistral_Logica.RecuperarMagistral(); foreach (Magistral magistral in listaMagistral) { comboBox_magistral.Items.Add(magistral.nombre + " " + magistral.apellidoPaterno + " " + magistral.apellidoMaterno); } } }