Exemplo n.º 1
0
        public void CanWithdrawAmount_GivenMinimumAllowedBalanceIsExceeded_ReturnFailedResult()
        {
            var sut = new AccountBuilder().WithBalance(0m).Build();

            var result = sut.CanWithdrawAmount(0.01m);

            Assert.False(result.Success);
        }
Exemplo n.º 2
0
        public void CanWithdrawAmount_GivenValidAmount_ReturnSuccessfulResult()
        {
            var sut = new AccountBuilder().WithBalance(0.01m).Build();

            var result = sut.CanWithdrawAmount(0.01m);

            Assert.True(result.Success);
        }
Exemplo n.º 3
0
        public void CanWithdrawAmount_GivenAmountLessThanZero_ReturnFailedResult()
        {
            var sut = new AccountBuilder().Build();

            var result = sut.CanWithdrawAmount(-0.01m);

            Assert.False(result.Success);
        }