Exemple #1
0
        public StateTests()
        {
            Bank1 = new Bank(1, "PKO");

            Bank1.Customers = new List<ICustomer> {
                new Customer(Bank1.NewCustomerId(), "Erika Klarsson"),
                new Customer(Bank1.NewCustomerId(), "Antony Incor")
            };

            Bank1.CreateAccounts();
        }
Exemple #2
0
        public BankTests()
        {
            Bank1 = new Bank(1, "PKO");
            Accounts = new List<IAccount>();

            Bank1.Customers = new List<ICustomer> {
                new Customer(Bank1.NewCustomerId(), "Erika Klarsson"),
                new Customer(Bank1.NewCustomerId(), "Antony Incor")
            };

            Bank1.CreateAccounts();

            Accounts = Bank1.Customers.SelectMany(customer => customer.Accounts).ToList();
        }
Exemple #3
0
        public DebitTests()
        {
            Bank1 = new Bank(1, "PKO");

            Bank1.Customers = new List<ICustomer> {
                new Customer(Bank1.NewCustomerId(), "Erika Klarsson"),
                new Customer(Bank1.NewCustomerId(), "Antony Incor")
            };

            Bank1.CreateAccounts();

            Customer = Bank1.Customers.ElementAt(_random.Next(0, Bank1.Customers.Count - 1));
            Account = Customer.Accounts.First();

            Operation = new Operation(Operations.Debit, new object[] { 250, Account });
        }
Exemple #4
0
        public MediatorTests()
        {
            Bank1 = new Bank(1, "PKO");
            Bank2 = new Bank(2, "WBK");

            Bank1.Customers = new List<ICustomer> {
                new Customer(Bank1.NewCustomerId(), "Erika Klarsson"),
                new Customer(Bank1.NewCustomerId(), "Antony Incor")
            };

            Bank1.CreateAccounts();

            Bank2.Customers = new List<ICustomer>
            {
                new Customer(Bank2.NewCustomerId(), "Kevin Enderson"),
                new Customer(Bank2.NewCustomerId(), "Richord Matthew")
            };

            Bank2.CreateAccounts();

            BankNetwork = new BankNetwork();
            BankNetwork.Register(Bank1);
            BankNetwork.Register(Bank2);
        }