void TCustomer::testGroupId () { Customer c; c.setGroupId (tGroup); QVERIFY (c.getGroupId () == tGroup); }
void MainWindow::on_FindCustomer_clicked() { if("" == ui->FindID->text()) { QMessageBox::about(0,Title,NoCustomerID); ui->FindID->setFocus(); } else { Customer customer; customer = CM.fetchCustomer(ui->FindID->text()); if(customer.getName()!="") { ui->FindName->setText(customer.getName()); ui->FindSurname->setText(customer.getSurname()); ui->FindGroupID->setText(QString("%1").arg(customer.getGroupId())); } else { QMessageBox::about(0,Title,NoCustomerID); } ui->FindName->setFocus(); } }
void TCustomer::testConstructor () { Customer c (tId, tName, tSurname, tGroup); QVERIFY (c.getId () == tId && c.getName () == tName && c.getSurname () == tSurname && c.getGroupId () == tGroup); }