Skip to content

Commit

Permalink
Merge pull request dahlbyk#37 from bflynnwonga/master
Browse files Browse the repository at this point in the history
 CA-1441: Updating Scotia mock driver
  • Loading branch information
Ilya Kozhevnikov committed Mar 12, 2012
2 parents 17eda1c + 0e073be commit c90e5c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Expand Up @@ -13,7 +13,7 @@ public class OnlineBillPaymentTransaction
private const int RemittanceTraceNumberLenght = 30;
private const int CustomerFullNameLenght = 35;

private long _amount;
private long _amountInCent;
private int _batchNumber;
private string _ccin;
private string _customerFullName;
Expand All @@ -32,10 +32,10 @@ public int BatchNumber
set { _batchNumber = value.AssertLenght(BatchNumberLenght); }
}

public long Amount
public long AmountInCent
{
get { return _amount; }
set { _amount = value.AssertLenght(AmountLenght); }
get { return _amountInCent; }
set { _amountInCent = value.AssertLenght(AmountLenght); }
}

public string Ccin
Expand All @@ -62,9 +62,9 @@ public string ToFileFormat()
{
return
string.Format(
"{0}{1}{2}{3}{4}{5}{6}{7}",
"{0}{1}{2}{3}{4}{5}{6}{7}\n",
RecordType, ItemNumber.ToStringWithPadLeft(ItemNumberLenght),
BatchNumber.ToStringWithPadLeft(BatchNumberLenght), Amount.ToStringWithPadLeft(AmountLenght),
BatchNumber.ToStringWithPadLeft(BatchNumberLenght), AmountInCent.ToStringWithPadLeft(AmountLenght),
Ccin.PadLeft(CcinLenght),
RemittancePaymentDate.ToString("yyyyMMdd", CultureInfo.InvariantCulture),
RemittanceTraceNumber.PadLeft(RemittanceTraceNumberLenght),
Expand All @@ -75,8 +75,8 @@ public override string ToString()
{
return
string.Format(
"ItemNumber: {0}, BatchNumber: {1}, Amount: {2}, Ccin: {3}, RemittancePaymentDate: {4}, RemittanceTraceNumber: {5}, CustomerFullName: {6}",
ItemNumber, BatchNumber, Amount, Ccin, RemittancePaymentDate, RemittanceTraceNumber,
"ItemNumber: {0}, BatchNumber: {1}, AmountInCent: {2}, Ccin: {3}, RemittancePaymentDate: {4}, RemittanceTraceNumber: {5}, CustomerFullName: {6}",
ItemNumber, BatchNumber, AmountInCent, Ccin, RemittancePaymentDate, RemittanceTraceNumber,
CustomerFullName);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Wonga.QA.Framework/Wonga.QA.Framework.Mocks/Scotia.cs
Expand Up @@ -77,7 +77,7 @@ public byte[] ToFileFormat()

private class OnlineBillPaymentRemittanceReportCustomerBatchHeaderRecord
{
private const int BatchNumberLenght = 4;
private const int BatchNumberLenght = 10;
private const int ProcessingModeLenght = 1;
private const int SebpLenght = 4;
private const int CorporateCreditorIdentificationNumberLenght = 8;
Expand Down Expand Up @@ -118,7 +118,7 @@ public string ToFileFormat()
{
return
string.Format(
"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}",
"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}\n",
RecordType, BatchNumber.ToStringWithPadLeft(BatchNumberLenght),
ProcessingMode.ToStringWithPadLeft(ProcessingModeLenght),
ProcessingDate.ToString("yyyyMMdd", CultureInfo.InvariantCulture),
Expand Down
Expand Up @@ -56,7 +56,7 @@ public void VerifyOnlineBillPaymentCreditedToCustomerAccount()

OnlineBillPaymentTransaction transaction = new OnlineBillPaymentTransaction
{
Amount = earlyRepaymentAmount,
AmountInCent = earlyRepaymentAmount * 100,
Ccin = customer.GetCcin(),
CustomerFullName = "CustomerFullName", // Todo: get name
ItemNumber = 1,
Expand Down

0 comments on commit c90e5c3

Please sign in to comment.