Esempio n. 1
0
        public void GetElementName_SpaceSelfClosing_WithOffset()
        {
            var xaml = "<Ex><Foo />";

            var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4);

            Assert.AreEqual("Foo", actual);
        }
Esempio n. 2
0
        public void GetElementName_NotEmpty_WithOffset()
        {
            var xaml = "<Ex><Foo>Bar</Foo>";

            var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4);

            Assert.AreEqual("Foo", actual);
        }
Esempio n. 3
0
        public void GetElementName_Attribute_WithOffset()
        {
            var xaml = "<Ex><Foo Bar=\"True\"></Foo>";

            var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4);

            Assert.AreEqual("Foo", actual);
        }
Esempio n. 4
0
        public void GetElementName_Empty_NoOffset()
        {
            var xaml = "<Foo></Foo>";

            var actual = XamlElementProcessor.GetElementName(xaml.AsSpan());

            Assert.AreEqual("Foo", actual);
        }
Esempio n. 5
0
        public void GetElementName_MultiLineSelfClosing_WithOffset()
        {
            var xaml = @"<Ex><Foo
ar=""True""
/>";

            var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4);

            Assert.AreEqual("Foo", actual);
        }