public Account LoadAccount(string AccountNumber)
        {
            FileAccountRepository.BuildAccountListFromFile();
            Account _account = new Account();

            _account = _accountList.FirstOrDefault(a => a.AccountNumber == AccountNumber);
            return(_account);
        }
コード例 #2
0
        public BasicAccountTestRepository(FileAccountRepository fileAccountRepository)
        {
            _fileAccountRepository = fileAccountRepository;

            _account = new Account
            {
                Name          = "Basic Account",
                Balance       = 100M,
                AccountNumber = "33333",
                Type          = AccountType.Basic
            };

            SaveAccount(_account);
        }
コード例 #3
0
        public PremiumAccountTestRepository(FileAccountRepository fileAccountRepository)
        {
            _fileAccountRepository = fileAccountRepository;

            _account = new Account
            {
                Name          = "Premium Account",
                Balance       = 100M,
                AccountNumber = "44444",
                Type          = AccountType.Premium
            };

            SaveAccount(_account);
        }
コード例 #4
0
        public FreeAccountTestRepository(FileAccountRepository fileAccountRepository)
        {
            _fileAccountRepository = fileAccountRepository;

            _account = new Account
            {
                Name          = "Free Account",
                Balance       = 100.00M,
                AccountNumber = "12345",
                Type          = AccountType.Free
            };

            SaveAccount(_account);
        }