コード例 #1
0
        public void CalculateAnnualCosts_Throws_Argument_Exception_Less_Then_Zero()
        {
            // Assert
            var inValidConsumption = -1;
            var product            = new PackagedProduct();

            // Act
            product.CalculateAnnualCosts(inValidConsumption);
        }
コード例 #2
0
        public void CalculateAnnualCosts_Returns_23600()
        {
            // Assert
            var expectedAnnualCosts = 23600;
            var validConsumption    = 80000;
            var product             = new PackagedProduct();

            // Act
            product.CalculateAnnualCosts(validConsumption);

            // Arrange
            Assert.IsNotNull(product);
            Assert.AreEqual(expectedAnnualCosts, product.AnnualCosts);
        }