示例#1
0
        public void CanPayInAmount_GivenPayInLimitIsExceeded_ReturnFailedResult()
        {
            var sut = new AccountBuilder().WithPaidIn(Account.PayInLimit).Build();

            var result = sut.CanPayInAmount(0.01m);

            Assert.False(result.Success);
        }
示例#2
0
        public void CanPayInAmount_GivenValidAmount_ReturnSuccessfulResult()
        {
            var sut = new AccountBuilder().WithPaidIn(Account.PayInLimit - 0.01m).Build();

            var result = sut.CanPayInAmount(0.01m);

            Assert.True(result.Success);
        }
示例#3
0
        public void CanPayInAmount_GivenAmountLessThanZero_ReturnFailedResult()
        {
            var sut = new AccountBuilder().Build();

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

            Assert.False(result.Success);
        }