public void NameParserTest(IName[] expectedParsedNames, string[] unsortedInput, string[] givenNameRegexPattern, string[] surnameRegexPattern) { // Could also iterate over every given and surname pattern, and check the according expected output. var nameParser = new NameParser(givenNameRegexPattern[0], surnameRegexPattern[0]); var parsedData = nameParser.ParseString(unsortedInput).ToList(); Assert.Equal(expectedParsedNames.ToList(), parsedData); }