public void GetSegments_Expected_LastSegmentIsCorrect() { PocoPath path = new PocoPath("EnumerableData().NestedData.NestedData.Name", "EnumerableData.NestedData.NestedData.Name"); string expected = "Name"; string actual = path.GetSegements().Last().ToString(); Assert.AreEqual(expected, actual); }
public void GetSegments_Expected_CorrectSegmentCount() { PocoPath path = new PocoPath("EnumerableData().NestedData.Name", "EnumerableData.NestedData.Name"); int expected = 3; int actual = path.GetSegements().Count(); Assert.AreEqual(expected, actual); }