public void When_Parse_Indexer() { var sut = new BindingPath("[hello_world]", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(1); result[0].PropertyName.Should().Be("[hello_world]"); }
public void When_Parse_AttachedProperty() { var sut = new BindingPath("(Grid.Column)", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(1); result[0].PropertyName.Should().Be("Grid.Column"); }
public void When_Parse_AttachedProperties() { var sut = new BindingPath("(hello.world).(bonjour:le.monde)", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(2); result[0].PropertyName.Should().Be("hello.world"); result[1].PropertyName.Should().Be("bonjour:le.monde"); }
public void When_Parse_TrimItemPath() { var sut = new BindingPath(" hello [world ]( bonjour:le.monde ).value ", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(4); result[0].PropertyName.Should().Be("hello"); result[1].PropertyName.Should().Be("[world ]"); result[2].PropertyName.Should().Be("bonjour:le.monde"); result[3].PropertyName.Should().Be("value"); }
public void When_Parse_Indexers() { var sut = new BindingPath("[hello][world][bonjour][le][monde]", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(5); result[0].PropertyName.Should().Be("[hello]"); result[1].PropertyName.Should().Be("[world]"); result[2].PropertyName.Should().Be("[bonjour]"); result[3].PropertyName.Should().Be("[le]"); result[4].PropertyName.Should().Be("[monde]"); }
public void When_Parse_SimpleProperties() { var sut = new BindingPath("hello.world.bonjour.le.monde", null); var result = sut.GetPathItems().ToArray(); result.Length.Should().Be(5); result[0].PropertyName.Should().Be("hello"); result[1].PropertyName.Should().Be("world"); result[2].PropertyName.Should().Be("bonjour"); result[3].PropertyName.Should().Be("le"); result[4].PropertyName.Should().Be("monde"); }