Skip to content

Commit

Permalink
JBEHAVE-1574 Fix typo: TransformerNotFountException -> `Transformer…
Browse files Browse the repository at this point in the history
…NotFoundException`
  • Loading branch information
valfirst committed Mar 3, 2023
1 parent 857a19d commit f11576a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public String transform(String transformerName, String tableAsString, TableParse
TableProperties properties) {
TableTransformer tableTransformer = transformers.get(transformerName);
if (tableTransformer == null) {
throw new TransformerNotFountException(transformerName);
throw new TransformerNotFoundException(transformerName);
}
String result = tableTransformer.transform(tableAsString, tableParsers, properties);
if (result == null) {
Expand Down Expand Up @@ -296,10 +296,10 @@ private List<Map<String, String>> getNamedRows(List<List<String>> tableRows, Lis
}
}

public class TransformerNotFountException extends RuntimeException {
public class TransformerNotFoundException extends RuntimeException {
private static final long serialVersionUID = 3742264745351414296L;

public TransformerNotFountException(String transformerName) {
public TransformerNotFoundException(String transformerName) {
super(String.format("Table transformer '%s' does not exist", transformerName));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.jbehave.core.model.TableTransformers.InvalidTransformationResultException;
import org.jbehave.core.model.TableTransformers.ResolvingSelfReferences;
import org.jbehave.core.model.TableTransformers.TableTransformer;
import org.jbehave.core.model.TableTransformers.TransformerNotFountException;
import org.jbehave.core.model.TableTransformers.TransformerNotFoundException;
import org.jbehave.core.steps.ParameterControls;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -38,7 +38,7 @@ private static TableProperties createExamplesTableProperties() {

@Test
void shouldNotTransformTableIfTransformerNotFound() {
TransformerNotFountException thrown = assertThrows(TransformerNotFountException.class,
TransformerNotFoundException thrown = assertThrows(TransformerNotFoundException.class,
() -> tableTransformers.transform("inexistentTransformer", TABLE_AS_STRING, TABLE_PARSERS, PROPERTIES));
assertEquals("Table transformer 'inexistentTransformer' does not exist", thrown.getMessage());
}
Expand Down

0 comments on commit f11576a

Please sign in to comment.