public void GetElementName_SpaceSelfClosing_WithOffset() { var xaml = "<Ex><Foo />"; var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4); Assert.AreEqual("Foo", actual); }
public void GetElementName_NotEmpty_WithOffset() { var xaml = "<Ex><Foo>Bar</Foo>"; var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4); Assert.AreEqual("Foo", actual); }
public void GetElementName_Attribute_WithOffset() { var xaml = "<Ex><Foo Bar=\"True\"></Foo>"; var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4); Assert.AreEqual("Foo", actual); }
public void GetElementName_Empty_NoOffset() { var xaml = "<Foo></Foo>"; var actual = XamlElementProcessor.GetElementName(xaml.AsSpan()); Assert.AreEqual("Foo", actual); }
public void GetElementName_MultiLineSelfClosing_WithOffset() { var xaml = @"<Ex><Foo ar=""True"" />"; var actual = XamlElementProcessor.GetElementName(xaml.AsSpan(), 4); Assert.AreEqual("Foo", actual); }