@Test public void addSpanSubstitutionNullAlternative() { thrown.expect(NullPointerException.class); thrown.expectMessage("Must provide an alternativeTagName"); builder.addSubstitution(SpanType.BOLD, (String) null); }
public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; }
HtmlLanguageBuilder { public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; } }
HtmlLanguageBuilder { public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; } HtmlLanguageBuilder(); }
HtmlLanguageBuilder { public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; } HtmlLanguageBuilder(); HtmlLanguageBuilder name(String name); HtmlLanguageBuilder add(BlockType blockType); HtmlLanguageBuilder add(SpanType spanType); HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName); HtmlLanguageBuilder addHeadings(int level); HtmlLanguageBuilder addSpanFont(); HtmlLanguageBuilder setXhtmlStrict(boolean xhtmlStrict); HtmlLanguageBuilder document(String prefix, String suffix); HtmlLanguage create(); }
HtmlLanguageBuilder { public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; } HtmlLanguageBuilder(); HtmlLanguageBuilder name(String name); HtmlLanguageBuilder add(BlockType blockType); HtmlLanguageBuilder add(SpanType spanType); HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName); HtmlLanguageBuilder addHeadings(int level); HtmlLanguageBuilder addSpanFont(); HtmlLanguageBuilder setXhtmlStrict(boolean xhtmlStrict); HtmlLanguageBuilder document(String prefix, String suffix); HtmlLanguage create();  }