public void Not_Transfer_Money_Does_Not_Have_Enough_Money() { var sut = WithEnoughMoney(StandardAccountValidBuilder.Make().For(_validClient)); Action act = () => sut.Transfer(2000, new Client(DateTime.Now)); act.Should().Throw <ArgumentException>() .WithMessage("amount"); }
public void Transfer_Money_Reduce_Money_From_Current_Account(decimal currentAmount) { var sut = StandardAccountValidBuilder.Make() .For(_validClient) .With(currentAmount); sut.Transfer(45, new Client(DateTime.Now.AddYears(-19))); sut.Amount.Should().Be(currentAmount - 45); }
public void Not_Transfer_Money_Client_Is_Not_Valid() { var sut = StandardAccountValidBuilder.Make() .For(_validClient) .With(1500); Action act = () => sut.Transfer(10, new Client(DateTime.Now)); act.Should().Throw <ArgumentException>() .WithMessage("client"); }
public void Create_New_Transactions() { var sut = WithEnoughMoney(StandardAccountValidBuilder.Make().For(_validClient)); sut.Transfer(45, new Client(DateTime.Now.AddYears(-19))); var transaction = sut.Transactions.First(); sut.Transactions.Count.Should().Be(1); transaction.Amount.Should().Be(45); transaction.Type.Should().Be(TransactionsType.Transfer); //transaction.Date.Should().Be(DateTime.Now); // ? }