1
// *********************************************************************
2
// Copyright 2007, Andreas Schlapsi
3
// This is free software licensed under the MIT license.
4
// *********************************************************************
7
namespace NUnitExtension.RowTest.Sample.VatCalculatorApp
9
public class VatCalculator
11
public VatCalculator()
15
public decimal CalculateVat(decimal amount, VatCategoryType categoryType)
17
return amount * GetTaxRate(categoryType);
20
private decimal GetTaxRate(VatCategoryType categoryType)
24
case VatCategoryType.CategoryA:
27
case VatCategoryType.CategoryB:
30
case VatCategoryType.CategoryC:
34
throw new ArgumentException(string.Format("Invalid VatCategoryType '{0}'.", categoryType));