示例#1
0
文件: StateTests.cs 项目: Tolga/Bank
        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();
        }
示例#2
0
文件: BankTests.cs 项目: Tolga/Bank
        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();
        }
示例#3
0
文件: DebitTests.cs 项目: Tolga/Bank
        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 });
        }
示例#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);
        }