Пример #1
0
        public void StringWithEscapedNewlinesCanBeParsed()
        {
            var propertyValue = SgfSimpleTextValue.Parse("Hello,\\\r world.");

            Assert.AreEqual(
                $"Hello, world.",
                propertyValue.Value);
        }
Пример #2
0
        public void MoreComplexTextIsProperlyParsed()
        {
            var actualValue =
                @"Meijin NR: yeah, k4 is won\
derful
sweat NR: thank you! :\)
dada NR: yup. I like this move too. It's a move only to be expected from a pro. I really like it :)
jansteen 4d: Can anyone\
 explain [me\] k4?";
            var expected =
                @"Meijin NR: yeah, k4 is wonderful sweat NR: thank you! :) dada NR: yup. I like this move too. It's a move only to be expected from a pro. I really like it :) jansteen 4d: Can anyone explain [me] k4?";
            var propertyValue = SgfSimpleTextValue.Parse(actualValue);
            var actual        = propertyValue.Value;

            TestUtilities.AssertStringEqualityByCharacters(expected, actual);
        }
Пример #3
0
        public void SimpleStringWithWhitespaceCanBeParsed()
        {
            var propertyValue = SgfSimpleTextValue.Parse("Hello,\t world.");

            Assert.AreEqual("Hello,  world.", propertyValue.Value);
        }
Пример #4
0
 public void NullValueCannotBeParsed()
 {
     SgfSimpleTextValue.Parse(null);
 }