Exemple #1
0
 //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];
 }
Exemple #2
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);
     }
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 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 );
     }
 }
Exemple #5
0
 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]);
 }