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")); }
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")); }
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")); }
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)); }
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)); }
public void SetUp() { ClassUnderTest = new TigoDashboard(); }