public void Creating_default_account_should_work() { // Act Account account = new AccountBuilder(1); // Assert account.Number.Should().Be(1); account.Balance.Should().Be(0); account.Type.Should().Be(AccountType.Checking); }
public void Transfer_amount_should_update_both_account() { // Arrange Account account1 = new AccountBuilder(1).With(a => a.Deposit(1000)); Account account2 = new AccountBuilder(); // Act account1.Transfer(200).To(account2); // Assert account1.Balance.Should().Be(800); account1.Number.Should().Be(1); account2.Balance.Should().Be(200); account2.Number.Should().Be(2); }