Ejemplo n.º 1
0
        public void InitAccountTest_ReturnsAccount()
        {
            var                  mock         = new Mock <IAccountService>();
            string               owner        = "John Smith";
            AccountType          type         = AccountType.Base;
            AccountNumberCreator creator      = new AccountNumberCreator();
            Account              defaultAcc   = new BaseAccount(1, "John", "Smith");
            Account              depositedAcc = new BaseAccount(1, "John", "Smith", 20);

            mock.Setup(accService => accService.OpenAccount(owner, type, creator)).Returns(defaultAcc);
        }
Ejemplo n.º 2
0
 public void SetUp()
 {
     accountService = new AccountService(new BonusesCalculator(), new AccountBinaryRepository("test.bin"));
     creator        = new AccountNumberCreator();
 }
Ejemplo n.º 3
0
 public void SetUp()
 {
     accountService = new Mock <AccountService>(new Mock <IBonusesCalculator>().Object, new Mock <IRepository>().Object).Object;
     creator        = new Mock <AccountNumberCreator>().Object;
 }