@Test public void testGetFromString() throws Exception { Path path = Path.fromDotString("1.2.3"); Assert.assertThat(path.getSize(), is(3)); Assert.assertThat(path.get(0), is("1")); Assert.assertThat(path.get(1), is("2")); Assert.assertThat(path.get(2), is("3")); }
@Test public void testGetFromStringSingleItem() throws Exception { Path path = Path.fromDotString("1"); Assert.assertThat(path.getSize(), is(1)); Assert.assertThat(path.get(0), is("1")); }