Beispiel #1
0
        public void TextObjectGetPropertiesTest()
        {
            const string source     = "MyTest\r\nYourTest\r\nHisTest\r\n";
            var          textObject = new TextObject(source);
            var          props      = textObject.GetProperties("([a-z|A-Z]*?)Test").ToList();

            Assert.AreEqual(3, props.Count);
            Assert.AreEqual("My", textObject.GetProperty(props[0]));
            Assert.AreEqual("Your", textObject.GetProperty(props[1]));
            // SerializeProperty is the same as GetProperty for text objects
            Assert.AreEqual("His", textObject.SerializeProperty(props[2]));
        }