use of org.nutz.lang.segment.Segment in project nutz by nutzam.
the class CharSegmentTest method testAtTheBegin.
@Test
public void testAtTheBegin() {
Segment seg = Segments.create("${4}B");
seg.set("4", "zzh");
assertEquals("zzhB", seg.toString());
assertEquals(1, seg.keys().size());
assertEquals(2, seg.values().size());
}
use of org.nutz.lang.segment.Segment in project nutz by nutzam.
the class CharSegmentTest method testNormal.
@Test
public void testNormal() {
Segment seg = Segments.create("H${4}B");
seg.set("4", "zzh");
assertEquals("H${4}B", seg.getOrginalString());
assertEquals("HzzhB", seg.toString());
assertEquals(1, seg.keys().size());
assertEquals(3, seg.values().size());
}
Aggregations