public void CalculatesSimpleTestCases(string inputStr, int expectedResult) { var inputArg = inputStr.Split("|") .Select(str => Array.ConvertAll(str.Split(" "), Int32.Parse)) .ToArray(); var result = CultureConference.getMinimumEmployees(inputArg); Assert.AreEqual(expectedResult, result); }
public void UsesSampleInput(string fileName, int expectedREsult) { var filePath = Path.Combine(TestContext.CurrentContext.TestDirectory, fileName); var allText = File.ReadAllText(filePath).Split(Environment.NewLine); var a = allText.Skip(1) .Select(l => Array.ConvertAll(l.Split(" "), Int32.Parse)) .ToArray(); var result = CultureConference.getMinimumEmployees(a); Assert.AreEqual(expectedREsult, result); }