Example #1
0
        public void RegistrarUnUsuario_InformaciĆ³nCorrecta()
        {
            try
            {
                Uri baseAddress = new Uri("net.tcp://*****:*****@estudiantes.uv.mx",
                    ContraseƱa        = "cuentaJuegoUno"
                };

                cliente.RegistrarJugador(nuevoJugador);

                ResultadoRegistro resultadoObtenido = registroAdmin.ResultadoDelRegistro;
                ResultadoRegistro resultadoEsperado = ResultadoRegistro.RegistroExitoso;

                Assert.IsTrue(resultadoEsperado == resultadoObtenido);
            }
            catch (EndpointNotFoundException)
            {
            }
        }
Example #2
0
 /// <summary>
 /// Hace la llamada al servidor para poder registrar un jugador.
 /// </summary>
 /// <param name="nuevoJugador">Jugador a registrar</param>
 /// <exception cref="EndpointNotFoundException"></exception>
 /// <exception cref="TimeoutException"></exception>
 /// <exception cref="CommunicationObjectFaultedException"></exception>
 public static void RegistrarNuevoJugador(Jugador nuevoJugador)
 {
     try
     {
         servidor.RegistrarJugador(nuevoJugador);
     }
     catch (EndpointNotFoundException ex)
     {
         LoggerAdmin.EscribirLog("Error", ex);
         throw;
     }
     catch (TimeoutException ex)
     {
         LoggerAdmin.EscribirLog("Error", ex);
         throw;
     }
     catch (CommunicationObjectFaultedException ex)
     {
         LoggerAdmin.EscribirLog("Error", ex);
         throw;
     }
 }