Numbering { public String styledLabelFor(int pageNumber) { return numberingStyle.toStyledString(pageNumber).trim(); } Numbering(NumberingStyle numberingStyle, int logicalPageNumber); @Override int hashCode(); @Override boolean equals(Object obj); NumberingStyle getNumberingStyle(); int getLogicalPageNumber(); String styledLabelFor(int pageNumber); static final Numbering NULL; }
@Test public void testFormatForLabelArabic() { Numbering victim = new Numbering(NumberingStyle.ARABIC, 100); assertThat(victim.styledLabelFor(110), is("110")); }
@Test public void testFormatForLabelRoman() { Numbering victim = new Numbering(NumberingStyle.ROMAN, 100); assertThat(victim.styledLabelFor(110), is("CX")); }