public void AreFieldsValid(string data, bool expected) { var buffer = data.Lines(); var passport = new Passport(buffer); Assert.Equal(expected, passport.AreFieldsValid()); }
private int ProcessBuffer2(IList <string> buffer) { var passport = new Passport(buffer); buffer.Clear(); if (passport.HasRequiredFields() && passport.AreFieldsValid()) { return(1); } return(0); }