예제 #1
0
        public void GetElementName_SpaceSelfClosing_WithOffset()
        {
            var xaml = "<Ex><Foo />";

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

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

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

            Assert.AreEqual("Foo", actual);
        }
예제 #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);
        }
예제 #4
0
        public void GetElementName_Empty_NoOffset()
        {
            var xaml = "<Foo></Foo>";

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

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

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

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