@Test(expected = CukedoctorDocumentBuilderImpl.NestingOverflowException.class) public void shouldThrowIfNestingBeyondLevel5() { builder.nestTitle().nestTitle().nestTitle().nestTitle().nestTitle().nestTitle(); }
@Override public CukedoctorDocumentBuilder nestTitle() { checkNestingOverflow(); currentTitleNestingLevel += 1; return this; }
CukedoctorDocumentBuilderImpl extends AsciiDocBuilder implements CukedoctorDocumentBuilder { @Override public CukedoctorDocumentBuilder nestTitle() { checkNestingOverflow(); currentTitleNestingLevel += 1; return this; } }
CukedoctorDocumentBuilderImpl extends AsciiDocBuilder implements CukedoctorDocumentBuilder { @Override public CukedoctorDocumentBuilder nestTitle() { checkNestingOverflow(); currentTitleNestingLevel += 1; return this; } CukedoctorDocumentBuilderImpl(); private  CukedoctorDocumentBuilderImpl(int initialTitleNestingLevel); }
CukedoctorDocumentBuilderImpl extends AsciiDocBuilder implements CukedoctorDocumentBuilder { @Override public CukedoctorDocumentBuilder nestTitle() { checkNestingOverflow(); currentTitleNestingLevel += 1; return this; } CukedoctorDocumentBuilderImpl(); private  CukedoctorDocumentBuilderImpl(int initialTitleNestingLevel); @Override AttributesBuilder attributes(); @Override CukedoctorDocumentBuilder sideBarBlock(String text); @Override CukedoctorDocumentBuilder append(Object... text); @Override CukedoctorDocumentBuilder textLine(String text); @Override CukedoctorDocumentBuilder sectionTitleLevel5(String title); @Override CukedoctorDocumentBuilder title(String title); @Override CukedoctorDocumentBuilder nestTitle(); CukedoctorDocumentBuilder unNestTitle(); @Override CukedoctorDocumentBuilder titleThenNest(String title); void clear(); @Override CukedoctorDocumentBuilder createNestedBuilder(); @Override CukedoctorDocumentBuilder createPeerBuilder(); }
CukedoctorDocumentBuilderImpl extends AsciiDocBuilder implements CukedoctorDocumentBuilder { @Override public CukedoctorDocumentBuilder nestTitle() { checkNestingOverflow(); currentTitleNestingLevel += 1; return this; } CukedoctorDocumentBuilderImpl(); private  CukedoctorDocumentBuilderImpl(int initialTitleNestingLevel); @Override AttributesBuilder attributes(); @Override CukedoctorDocumentBuilder sideBarBlock(String text); @Override CukedoctorDocumentBuilder append(Object... text); @Override CukedoctorDocumentBuilder textLine(String text); @Override CukedoctorDocumentBuilder sectionTitleLevel5(String title); @Override CukedoctorDocumentBuilder title(String title); @Override CukedoctorDocumentBuilder nestTitle(); CukedoctorDocumentBuilder unNestTitle(); @Override CukedoctorDocumentBuilder titleThenNest(String title); void clear(); @Override CukedoctorDocumentBuilder createNestedBuilder(); @Override CukedoctorDocumentBuilder createPeerBuilder();  }