コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }