///<summary> ///Purpose : Check Mandatory ///Parameters: None ///Expected : MSG0007: These fields are required: [Contract code], [OCC] ///</summary> public string Case5() { IBillingTempHandler target = ServiceContainer.GetService <IBillingTempHandler>() as IBillingTempHandler; string strContractCode = null; string strOCC = null; int iSequenceNo = 0; string expected = "MSG0007"; string actual; try { target.DeleteBillingTempByKey(strContractCode, strOCC, iSequenceNo); actual = string.Empty; } catch (ApplicationErrorException ex) { actual = ex.ErrorResult.Message.Code; } catch (Exception ex) { actual = ex.StackTrace; } return(string.Format(RESULT_FORMAT, 5, expected, actual, CompareResult_String(expected, actual))); }
///<summary> ///Purpose : Keep billing data (Delete) ///Parameters: - ContractCode = N0012125 /// - OCC = 0001 /// - SequenceNo = 1 ///Expected : Delete tbt_BillingTemp : 1 record /// In tbt_BillingTemp not found data of : /// Contract code = N0012125 /// OCC = 0001 /// SqquenceNo = 1 /// /// Keep operation log to log table ///</summary> public string Case6() { IBillingTempHandler target = ServiceContainer.GetService <IBillingTempHandler>() as IBillingTempHandler; string strContractCode = "N0000012125"; string strOCC = "0001"; int iSequenceNo = 1; int expected = 1; int actual = 0; string error = string.Empty; try { List <tbt_BillingTemp> resultList = target.DeleteBillingTempByKey(strContractCode, strOCC, iSequenceNo); if (resultList != null && resultList.Count > 0) { actual = resultList.Count; } } catch (ApplicationErrorException ex) { error = ex.ErrorResult.Message.Code; } catch (Exception ex) { error = ex.StackTrace; } if (error == string.Empty) { bool bResult = (actual == expected); return(string.Format(RESULT_FORMAT_LIST, 6, bResult)); } else { return(string.Format(RESULT_FORMAT_ERROR, 6, "Fail", error)); } }