public void GivenLastGeneratedInvoiceIDIs(string lastInvoiceID)
 {
     invoiceContextData.lastInvoiceID = lastInvoiceID;
     BillingSequenceNumbersMock invoiceDataManagerMock = new BillingSequenceNumbersMock();
     invoiceContextData.billDataManager.SetBillingSequenceNumberCollaborator(invoiceDataManagerMock);
     invoiceContextData.billDataManager.InvoiceSequenceNumber=uint.Parse(lastInvoiceID.Substring(7));
 }
        public static void ClassInit(TestContext context)
        {
            BillingSequenceNumbersMock invoiceDataManagerMock = new BillingSequenceNumbersMock();
            BillingDataManager.Instance.SetBillingSequenceNumberCollaborator(invoiceDataManagerMock);
            BillingDataManager.Instance.InvoiceSequenceNumber=5000;
            invoicesManager = new InvoicesManager();

            clubMembers = new Dictionary<string, ClubMember>()
            {
                {"00001", new ClubMember("00001", "Francisco", "Gómez-Caldito", "Viseas")},
                {"00002", new ClubMember("00002", "Pedro", "Pérez", "Gómez")}
            };

            creditor = new Creditor("G35008770", "Real Club Náutico de Gran Canaria");
            creditorAgent = new CreditorAgent(new BankCode("2100", "CaixaBank","CAIXESBBXXX"));
            directDebitInitiationContract = new DirectDebitInitiationContract(
                new BankAccount(new InternationalAccountBankNumberIBAN("ES5621001111301111111111")),
                creditor.NIF,
                "777",
                creditorAgent);

            var directDebitmandateslist = new[]
            {
                new {clubMemberID = "00001", internalReference = 1234, ccc = "21002222002222222222" },
                new {clubMemberID = "00002", internalReference = 1235, ccc = "21003333802222222222" }
            };

            foreach (var ddM in directDebitmandateslist)
            {
                DirectDebitMandate directDebitMandate = new DirectDebitMandate(
                    ddM.internalReference,
                    new DateTime(2013,11,11),
                    new BankAccount(new ClientAccountCodeCCC(ddM.ccc)),
                    clubMembers[ddM.clubMemberID].FullName);
                clubMembers[ddM.clubMemberID].AddDirectDebitMandate(directDebitMandate);
            }

            var billsList = new[]
            {
                new {clubMemberID = "00001", Amount = 79, transactionDescription = "Cuota Social Octubre 2013" },
                new {clubMemberID = "00002", Amount = 79, transactionDescription="Cuota Social Octubre 2013" },
                new {clubMemberID = "00002", Amount = 79, transactionDescription="Cuota Social Noviembre 2013"}
            };

            foreach (var bill in billsList)
            {
                List<Transaction> transaction = new List<Transaction>()
                {
                    new Transaction(bill.transactionDescription,1,bill.Amount,new Tax("NoTAX",0),0)
                };
                ClubMember clubMember = clubMembers[bill.clubMemberID];
                InvoiceCustomerData invoiceCustomerData = new InvoiceCustomerData(clubMember);
                Invoice invoice = new Invoice(invoiceCustomerData, transaction, new DateTime(2013, 11, 11));
                invoicesManager.AddInvoiceToClubMember(invoice, clubMember);
            }

            spanishBankCodes = new BankCodes(@"XMLFiles\SpanishBankCodes.xml", BankCodes.BankCodesFileFormat.XML);
        }
        public static void ClassInit(TestContext context)
        {
            MembersSequenceNumberMock membersSequenceNumberMock = new MembersSequenceNumberMock();
            clubMemberDataManager = ClubMemberDataManager.Instance;
            clubMemberDataManager.SetMembersSequenceNumberCollaborator(membersSequenceNumberMock);

            BillingSequenceNumbersMock billingSequenceNumbersMock = new BillingSequenceNumbersMock();
            billDataManager = BillingDataManager.Instance;
            billDataManager.SetBillingSequenceNumberCollaborator(billingSequenceNumbersMock);
        }
        public static void ClassInit(TestContext context)
        {
            BillingSequenceNumbersMock invoiceDataManagerMock = new BillingSequenceNumbersMock();
            BillingDataManager.Instance.SetBillingSequenceNumberCollaborator(invoiceDataManagerMock);

            transactionList = new List<Transaction>()
            {
                {new Transaction("Monthly Fee",1,80,new Tax("NOIGIC",0),0)},
                {new Transaction("Renting a Kajak",1,50,new Tax("NOIGIC",0),0)},
                {new Transaction("Blue cup",2,10,new Tax("NOIGIC",0),0)},
                {new Transaction("BIG Mouring",1,500,new Tax("NOIGIC",0),0)}
            };

            clubMember = new ClubMember("0002", "Francisco", "Gomez", "");
            invoiceCustomerData = new InvoiceCustomerData(clubMember);
        }
 public void InitializeSequenceNumbersManagers()
 {
     BillingSequenceNumbersMock billingSequenceNumbersMock = new BillingSequenceNumbersMock();
     invoiceContextData.billDataManager.SetBillingSequenceNumberCollaborator(billingSequenceNumbersMock);
 }
 public void InitializeScenario()
 {
     directDebitContextData.billDataManager = BillingDataManager.Instance;
     BillingSequenceNumbersMock billingSequenceNumbersMock = new BillingSequenceNumbersMock();
     directDebitContextData.billDataManager.SetBillingSequenceNumberCollaborator(billingSequenceNumbersMock);
 }
 public static void ClassInit(TestContext context)
 {
     BillingSequenceNumbersMock billingSequenceNumbersMock = new BillingSequenceNumbersMock();
     billDataManager = BillingDataManager.Instance;
     billDataManager.SetBillingSequenceNumberCollaborator(billingSequenceNumbersMock);
 }