コード例 #1
0
        public frmException(CentralitaException ex)
        {
            InitializeComponent();
            DateTime      dt   = DateTime.Now;
            StringBuilder data = new StringBuilder();

            data.AppendLine($"Error: {ex.Message} producido en {ex.NombreClase} al usar {ex.NombreMetodo}.");
            data.AppendLine($"Source: {ex.Source}");
            data.AppendLine($"Method: {ex.TargetSite}");
            data.AppendLine($"InnerException: {ex.InnerException}");

            rtbExceptionDescription.Text = data.ToString();
            lblRealDateException.Text    = dt.ToString();
        }
コード例 #2
0
        public void ValidarLlamadasProvincialesRepetidas()
        {
            CentralitaException exception  = null;
            Centralita          centralita = new Centralita("Telefonica");
            Provincial          llamada1   = new Provincial("40204020", Provincial.Franja.Franja_1, 444, "44");
            Provincial          llamada2   = new Provincial("40204020", Provincial.Franja.Franja_3, 25, "44");

            try
            {
                centralita += llamada1;
                centralita += llamada2;
            }
            catch (CentralitaException e)
            {
                exception = e;
            }
            Assert.IsNotNull(exception, "Se intento intento agregar llamadas provinciales con igual numero de origen y destino y no se produjo CentralitaException.");
        }
コード例 #3
0
        public void ValidarLlamadasLocalesRepetidas()
        {
            CentralitaException exception  = null;
            Centralita          centralita = new Centralita("Telefonica");
            Local llamada1 = new Local("40204020", 50, "44", 444);
            Local llamada2 = new Local("40204020", 5, "44", 550);

            try
            {
                centralita += llamada1;
                centralita += llamada2;
            }
            catch (CentralitaException e)
            {
                exception = e;
            }
            Assert.IsNotNull(exception, "Se intento intento agregar llamadas locales con igual numero de origen y destino y no se produjo CentralitaException.");
        }
コード例 #4
0
 public FrmMensajeError(CentralitaException e)
 {
     this.excepcion = e;
 }