コード例 #1
0
        public void CalculateDepreciation_GivenAssetValue100AndUsefulYears1_ShouldReturn100(int assetValue, int salvage, int usefulYears, int expected)
        {
            //Arrange
            DepreciationCalculator sut = new DepreciationCalculator();

            //act
            var actual = sut.CalculateDepreciation(assetValue, salvage, usefulYears);

            //Assert
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        private DepreciationCalculator CreateDepreciationCalculator()
        {
            var calculator = new DepreciationCalculator();

            return(calculator);
        }