///<summary> ///Purpose : Check Mandatory ///Parameters: None ///Expected : MSG0007: These fields are required: [Contract code], [Billing client code], [Billing office code], [Billing OCC], [Billing target code] ///</summary> public string Case5() { IBillingTempHandler target = ServiceContainer.GetService <IBillingTempHandler>() as IBillingTempHandler; string strContractCode = null; string strBillingClientCode = null; string strBillingOfficeCode = null; string strBillingOCC = null; string strBillingTargetCode = null; string expected = "MSG0007"; string actual; try { target.UpdateBillingTempByBillingClientAndOffice(strContractCode, strBillingClientCode, strBillingOfficeCode, strBillingOCC, strBillingTargetCode); 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 (Edit) ///Parameters: - Contract Code = N0000012125 /// - Billing Client Code = C000000032 /// - Billing Office Code = 1000 /// - Billing OCC = 04 /// - Billing Target Code = C000000032-001 ///Expected : Update tbt_BillingTemp : 1 records /// Contract Code = N0012125 /// Billing Client Code = C000000032 /// Billing Office Code = 1000 /// /// Keep operation log to log table /// /// See expectation data test case 6 ///</summary> public string Case6() { IBillingTempHandler target = ServiceContainer.GetService <IBillingTempHandler>() as IBillingTempHandler; string strContractCode = "N0000012125"; string strBillingClientCode = "C000000032"; string strBillingOfficeCode = "1000"; string strBillingOCC = "04"; string strBillingTargetCode = "C000000032-001"; List <tbt_BillingTemp> expected = null; List <tbt_BillingTemp> actual = null; string error = string.Empty; DateTime dtProcessDateTime = CommonUtil.dsTransData.dtOperationData.ProcessDateTime; string strFieldName = "ContractCode OCC SequenceNo BillingOCC BillingTargetRunningNo BillingClientCode BillingTargetCode BillingOfficeCode BillingType CreditTerm BillingTiming BillingAmt PayMethod BillingCycle CalDailyFeeStatus SendFlag UpdateDate UpdateBy"; try { actual = target.UpdateBillingTempByBillingClientAndOffice(strContractCode, strBillingClientCode, strBillingOfficeCode, strBillingOCC, strBillingTargetCode); expected = this.CreateExpectedForCase6(dtProcessDateTime); } catch (ApplicationErrorException ex) { error = ex.ErrorResult.Message.Code; } catch (Exception ex) { error = ex.StackTrace; } if (error == string.Empty) { bool bResult = CompareObjectList <tbt_BillingTemp>(actual, expected, strFieldName); return(string.Format(RESULT_FORMAT_LIST, 6, bResult)); } else { return(string.Format(RESULT_FORMAT_ERROR, 6, "Fail", error)); } }