using System; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using TestCaseExtension; namespace TestCaseTesting { // TestCase classes must be marked with the TestCaseClass attribute [TestCaseClass] public class SimpleTestCases { // TestCase methods must also be marked with the TestMethod attribute [TestMethod] [TestCase(5, 2, 3)] [TestCase(7, 3, 4)] [TestCase(9, 5, 4)] public void TestSum(int expected, int a, int b) { Assert.AreEqual(expected, a + b); } [TestMethod] [TestCase(3.0, 1.2, true)] [TestCase(2.3, 4.1, false)] [TestCase(7.4, 3.5, true)] [TestCase(5.6, 8.7, false)] public void TestGreaterThan(double a, double b, bool expected) { Assert.AreEqual(expected, a > b); } } }