コード例 #1
0
        public void CreateOperation_Amount_IsNegative()
        {
            Account account = new Account();

            OperationServices operationServices = new OperationServices(_repository, _accountRepository);
            operationServices.CreateOperations(account, OperationType.Deposit, -10000);
        }
コード例 #2
0
        public void CreateOperation_DefaultCase()
        {
            Expect.Call(_accountRepository.GetBalance(3)).Return(15000);
            _mocks.ReplayAll();

            Account account = new Account { Id = 3 };
            OperationServices operationServices = new OperationServices(_repository, _accountRepository);
            operationServices.CreateOperations(account, OperationType.Withdraw, 10000);

            _mocks.VerifyAll();
        }
コード例 #3
0
 public void CreateOperation_Account_IsNull()
 {
     OperationServices operationServices = new OperationServices(_repository,_accountRepository);
     operationServices.CreateOperations(null, OperationType.Deposit, 10000);
 }