public void TestInitialize() { _fakeContext = new FakeBankContext(); _controller = new TransactionsController(_fakeContext); _givenBankAccounts = new[] { new BankAccount { Id = new Guid("bd877de3-d2c9-4237-b5ca-08bd3ba56cd8"), Balance = 1000 }, new BankAccount { Id = new Guid("29222f0b-dd48-4589-921b-02eb8a4518f0"), Balance = 100 }, }; _givenTransactions = new[] { new Transaction { Id = new Guid("bd877de3-d2c9-4237-b5ca-08bd3ba56ca7"), AccountFrom = _givenBankAccounts[0], AccountTo = _givenBankAccounts[1], Amount = 100, Timestamp = new DateTime(2015, 1, 1) } }; _fakeContext.BankAccounts.AddRange(_givenBankAccounts); _fakeContext.Transactions.AddRange(_givenTransactions); }
public void TestInitialize() { _fakeContext = new FakeBankContext(); _controller = new BankAccountsController(_fakeContext); _givenBankAccounts = new[] { new BankAccount { Id = new Guid("bd877de3-d2c9-4237-b5ca-08bd3ba56cd8"), Balance = 1000 }, new BankAccount { Id = new Guid("29222f0b-dd48-4589-921b-02eb8a4518f0"), Balance = 100 }, }; _fakeContext.BankAccounts.AddRange(_givenBankAccounts); }