//Lee el nombre de la prueba public void LeerNombre(StreamReader lector) { string[] nombrePrueba = MA.Leer(lector); if (nombrePrueba.Length != 1) { throw new Exception(Mensajes.NombrePruebaNoPermitido); } Nombre = nombrePrueba[0]; }
public void LeerFinDePrueba(StreamReader lector) { string[] finPrueba; finPrueba = MA.Leer(lector); if (finPrueba.Length != 1) { throw new Exception(Mensajes.FinDePruebaIncorrecto); } if (finPrueba[0] != "FinDePrueba") { throw new Exception(Mensajes.FinDePruebaIncorrecto); } }
public override void Leer(StreamReader lector) { string[] parametros; try { parametros = MA.Leer(lector); } catch (Exception e) { throw new Exception(Mensajes.ErrorAlLeerParametro(Definicion.Nombre, e)); } EstablecerValor(parametros); }
private void LeerCantidadDePruebas( StreamReader lector ) { string[] cantPruebas = MA.Leer( lector ); if( cantPruebas.Length!=1 ) throw new Exception( Mensajes.ParametroCantidadDePruebasIncorrecto ); try { CantPruebas = int.Parse( cantPruebas[0] ); } catch( Exception ) { throw new Exception( Mensajes.ParametroCantidadDePruebasIncorrecto ); } }
public override void Leer(StreamReader lector) { string[] parametros; try { parametros = MA.Leer(lector); } catch (Exception e) { throw new Exception(Mensajes.ErrorAlLeerParametro(Definicion.Nombre, e)); } if (parametros.Length != 1) { throw new Exception(Mensajes.CantidadDeParametrosNoCoincidenConDefinicion); } EstablecerValor(parametros[0]); }