示例#1
0
        public void AreFieldsValid(string data, bool expected)
        {
            var buffer   = data.Lines();
            var passport = new Passport(buffer);

            Assert.Equal(expected, passport.AreFieldsValid());
        }
示例#2
0
        private int ProcessBuffer2(IList <string> buffer)
        {
            var passport = new Passport(buffer);

            buffer.Clear();

            if (passport.HasRequiredFields() && passport.AreFieldsValid())
            {
                return(1);
            }

            return(0);
        }