Пример #1
0
 public void One_2x2()
 {
     var sb = new StringBuilder();
     sb.AppendLine("2 2");
     sb.AppendLine("**");
     sb.AppendLine("**");
     var reader = new FieldReader(sb.ToString());
     var output = reader.ReadField();
     Assert.That(output.Rows.ToString(), Is.EqualTo("**" + Environment.NewLine + "**"));
 }
Пример #2
0
        public string ShowHints()
        {
            var reader = new FieldReader(input);
            var result = "";

            int fieldCount = 1;
            while (reader.HasMoreFields())
            {
                result += GetHeader(fieldCount++) +
                          GetFieldWithHints(reader).Rows + Environment.NewLine;
            }
            return RemoveNewline(result);
        }
Пример #3
0
 public void Empty()
 {
     var reader = new FieldReader("");
     Assert.That(reader.HasMoreFields(), Is.False);
 }
Пример #4
0
 private Field GetFieldWithHints(FieldReader reader)
 {
     return (new HintsPopulator(reader.ReadField())).GetHints();
 }