Exemple #1
0
        public void ParseArrayTest2()
        {
            MemoryStream stream = new MemoryStream();
            StreamWriter writer = new StreamWriter(stream);

            writer.WriteLine(".               ");
            writer.Flush();
            stream.Seek(0, SeekOrigin.Begin);

            using (TextReader reader = new StreamReader(stream))
            {
                YamlParser parser = new YamlParser(reader, null);
                Assert.IsNull(parser.ParseArray(YamlCharacterType.Space));
            }
        }
Exemple #2
0
        public void ParseArrayTest1()
        {
            MemoryStream stream   = new MemoryStream();
            StreamWriter writer   = new StreamWriter(stream);
            string       expected = "               ";

            writer.WriteLine(expected);
            writer.Flush();
            stream.Seek(0, SeekOrigin.Begin);

            using (TextReader reader = new StreamReader(stream))
            {
                YamlParser parser = new YamlParser(reader, null);
                Assert.AreEqual(expected, parser.ParseArray(YamlCharacterType.Space));
            }
        }