public void DataProcessor(int paragraphindex, int?birthyear, int?issueYear, int?expirationYear, HeightKey heightkey, int?heightvalue, string hairColor, EyeColor eyeColor, string passportId, int?countryId) { var paragraphs = CreateParagraphs(Part1Path); var passportData = Day4.CreatePassportData(paragraphs[paragraphindex]); Assert.AreEqual(birthyear, passportData.BirthYear); Assert.AreEqual(issueYear, passportData.IssueYear); Assert.AreEqual(expirationYear, passportData.ExpirationYear); Assert.AreEqual(heightkey, passportData.HeightData?.HeightKey); Assert.AreEqual(heightvalue, passportData.HeightData?.HeightValue); Assert.AreEqual(hairColor, passportData.HairColor); Assert.AreEqual(eyeColor, passportData.EyeColor); Assert.AreEqual(countryId, passportData.CountryId); }
public void ValidityChecker(int?birthyear, int?issueYear, int?expirationYear, HeightKey heightKey, int heightValue, string hairColor, EyeColor eyeColor, string passportId, int?countryId, bool expectedValidity) { var passportData = new PassPortData { BirthYear = birthyear, IssueYear = issueYear, ExpirationYear = expirationYear, HeightData = new HeightData { HeightKey = heightKey, HeightValue = heightValue }, HairColor = hairColor, EyeColor = eyeColor, PassportId = passportId, CountryId = countryId }; var actualValidity = Day4.PassportIsValid(passportData); Assert.AreEqual(expectedValidity, actualValidity); }