public void TestAddGrid() { Client client = new Client(USERNAME_OK, PASSWORD_OK, NAME_OK, SURNAME_OK, ID_OK, PHONE_OK, ADDRESS_OK, DATE_OK, null); CLIENT_HANDLER.Add(client); Grid anotherGrid = new Grid(GRID_NAME_OK, client, HEIGHT, WIDTH); GRID_HANDLER.Add(anotherGrid); Assert.IsTrue(dataStorage.Grids.Contains(anotherGrid)); }
private void addClient(object sender, EventArgs e) { try { Client newClient = fetchValues(); userRepository.UserExist(newClient.Username); handler.Add(newClient); MessageBox.Show("El cliente " + newClient.Username + " fue ingresado exitosamente al sistema.", "Mensaje de Confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearForm(); } catch (ExceptionController Exception) { String message = Exception.Message; MessageBox.Show(message, "Error en datos", MessageBoxButtons.OK, MessageBoxIcon.Error); } }