@Test public void should_throw_an_illegal_state_exception_as_the_language_parameter_is_not_valid() { try { SpellingCheck check = new SpellingCheck(); check.setLanguage("abc"); GherkinCheckVerifier.issues(check, CheckTestUtils.getTestFile("spelling/spelling.feature")).noMore(); } catch (IllegalStateException e) { assertThat(e.getMessage()).isEqualTo("Check gherkin:spelling (Spelling mistakes should be fixed): " + "language parameter \"abc\" is not valid. Allowed values are: ast-ES, be-BY, br-FR, ca-ES, ca-ES-valencia, " + "da-DK, de, de-AT, de-CH, de-DE, de-DE-x-simple-language, el-GR, en, en-AU, en-CA, en-GB, en-NZ, en-US, " + "en-ZA, eo, es, fa, fr, gl-ES, is-IS, it, ja-JP, km-KH, lt-LT, ml-IN, nl, pl-PL, pt, pt-BR, pt-PT, " + "ro-RO, ru-RU, sk-SK, sl-SI, sv, ta-IN, tl-PH, uk-UA, zh-CN"); } }
@VisibleForTesting void setLanguage(String language) { this.language = language; }
SpellingCheck extends SubscriptionVisitorCheck { @VisibleForTesting void setLanguage(String language) { this.language = language; } }
SpellingCheck extends SubscriptionVisitorCheck { @VisibleForTesting void setLanguage(String language) { this.language = language; }  }
SpellingCheck extends SubscriptionVisitorCheck { @VisibleForTesting void setLanguage(String language) { this.language = language; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitFile(Tree tree); @Override void visitNode(Tree tree); @Override void validateParameters(); }
SpellingCheck extends SubscriptionVisitorCheck { @VisibleForTesting void setLanguage(String language) { this.language = language; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitFile(Tree tree); @Override void visitNode(Tree tree); @Override void validateParameters();  }