public void MeterReading_DEL_True() { //Arrange //Act var deleteMeterReading = _meterReading.Delete(new SmartDB(), "99ec376bd55f422085789bb89ee93664"); bool flag = deleteMeterReading.Code == ErrorEnum.NoError; //Assert Assert.IsTrue(flag); }
private void ButtonDelete_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(TextBoxSerialNumber.Text) && _currentUser.Role == "Administrator") { var deleteMeterReading = _meterReading.Delete(new SmartDB(), _meterReadingId); bool flag = deleteMeterReading.Code == ErrorEnum.NoError; if (flag) { MessageBox.Show("Meter Reading Deleted"); ResetControls(); //BindMeterReadingWithDataGrid(); } else { MessageBox.Show(deleteMeterReading.Message); } } else { MessageBox.Show("No meter reading to delete or Contact Admin."); } }