1
// *********************************************************************
2
// Copyright 2007, Andreas Schlapsi
3
// This is free software licensed under the MIT license.
4
// *********************************************************************
7
using NUnit.Framework.SyntaxHelpers;
8
using NUnitExtension.RowTest;
9
using NUnitExtension.RowTest.Sample.VatCalculatorApp;
11
namespace NUnitExtension.RowTest.Sample
14
public class VatCalculatorTest
17
[Row(100, VatCategoryType.CategoryA, 20)]
18
[Row(100, VatCategoryType.CategoryB, 15)]
19
[Row(100, VatCategoryType.CategoryC, 10)]
20
[Row(150, VatCategoryType.CategoryA, 30)]
21
[Row(200, VatCategoryType.CategoryB, 30)]
22
[Row(150, VatCategoryType.CategoryC, 15)]
23
public void CalculateVat(int amount, VatCategoryType categoryType, int expectedResult)
25
VatCalculator calculator = new VatCalculator();
27
decimal result = calculator.CalculateVat((decimal)amount, categoryType);
29
Assert.That(result, Is.EqualTo((decimal)expectedResult));