コード例 #1
0
        public void CalculeBalance_Should_Throw_BusinessException()
        {
            #region Arrenge

            ICalculator deposit = new AccountDeposit(_account);

            #endregion

            #region Assert

            Assert.Throws <BusinessException>(() => deposit.CalculeBalance(0));


            #endregion
        }
コード例 #2
0
        public void CalculeBalance_Should_Works()
        {
            #region Arrenge
            _account.Balance = 100M;

            ICalculator deposit = new AccountDeposit(_account);

            #endregion

            #region Assert

            var act = deposit.CalculeBalance(100);


            #endregion

            act.Should().Be(200);
        }