コード例 #1
0
        public void CalculateOperationCost_InvalidAdministrationCost_ThrowsArgumentInvalidException()
        {
            //Act & Assert
            var exception = Assert.Throws <ArgumentException>(() => TigoDashboard.CalculateOperationCost(1000, 10, 10, -10, 25));

            Assert.That(exception.Message, Is.EqualTo("Administration cost can't be lesser to zero"));
        }
コード例 #2
0
        public void CalculateInvestment_InvalidFixedAssets_ThrowsArgumentInvalidException()
        {
            //Act & Assert
            var exception = Assert.Throws <ArgumentException>(() => TigoDashboard.CalculateInvestment(10, 10, 10, -10));

            Assert.That(exception.Message, Is.EqualTo("Fixed assets can't be lesser to zero"));
        }
コード例 #3
0
        public void CalculateInvestment_InvalidAccountsReceivable_ThrowsArgumentInvalidException()
        {
            //Act & Assert
            var exception = Assert.Throws <ArgumentException>(() => TigoDashboard.CalculateInvestment(-10, 10, 10, 10));

            Assert.That(exception.Message, Is.EqualTo("Accounts receivable can't be lesser to zero"));
        }
コード例 #4
0
        public void CalculateOperationCost_ValidParams_ReturnExpectedDirectCost(decimal workforce, decimal manfacturingCost, decimal salesCost, decimal administrationCost, decimal financialCost, decimal expectedDirectCost)
        {
            //Act
            decimal operationCost = TigoDashboard.CalculateOperationCost(workforce, manfacturingCost, salesCost, administrationCost, financialCost);

            ///Assert
            Assert.That(operationCost, Is.EqualTo(expectedDirectCost));
        }
コード例 #5
0
        public void CalculateInvestment_ValidParams_ReturnExpectedInvestment(decimal accountsReceivable, decimal inventoriesAmount, decimal currentAssets, decimal fixedAssets, decimal expectedInvestment)
        {
            // Act
            decimal investment = TigoDashboard.CalculateInvestment(accountsReceivable, inventoriesAmount, currentAssets, fixedAssets);

            // Assert
            Assert.That(investment, Is.EqualTo(expectedInvestment));
        }
コード例 #6
0
 public void SetUp()
 {
     ClassUnderTest = new TigoDashboard();
 }