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); }
public void SetUp() { accountService = new AccountService(new BonusesCalculator(), new AccountBinaryRepository("test.bin")); creator = new AccountNumberCreator(); }
public void SetUp() { accountService = new Mock <AccountService>(new Mock <IBonusesCalculator>().Object, new Mock <IRepository>().Object).Object; creator = new Mock <AccountNumberCreator>().Object; }