Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LexerImpl Unit Tests #480

Merged
merged 16 commits into from
Oct 21, 2019
Merged

LexerImpl Unit Tests #480

merged 16 commits into from
Oct 21, 2019

Conversation

nward1234
Copy link
Contributor

Added unit tests for the LexerImpl class and did some minor renaming and minor refactoring in LexerImpl to improve clarity (no functional changes -- just adding tests at this time). Also added log4j debug level log statements in LexerImpl, PebbleEngine and LexerImpl that were useful to me when trying to follow the code. Added logback-test.xml to configure the logging level. Disabled the debug logging by default. Also removed Hamcrest Matchers and replaced references to Hamcrest in exception testing code with AssertJ.

…ng is enabled. Also added assertj and commons-io Maven dependencies for use in the tests. Commons IO is used to compare template output to expected output that is loaded from a file. Loading the expected template output from a file is useful for testing multiline template output, which is necessary to test various scenarios. These are a form of Integration Test rather than Unit Tests and so it is practical and reasonable to verify the template output in this way.
…hanged the test method names in some cases to make the purpose of each test method more clear.
…hich I found useful to see in log statements.
…provides more evidence that the Pebble syntax is good. Jinja is a very popular Python template engine.
…l log statements in LexerImpl, PebbleEngine and LexerImpl that were useful to me when trying to follow the code. Added logback-test.xml to configure the logging level. Disabled the debug logging by default. Also removed Hamcrest Matchers and replaced references to Hamcrest in exception testing code with AssertJ. Also, changed the name of a few private methods in LexerImpl for improve clarity.
@ebussieres ebussieres added this to the 3.1.1 milestone Oct 21, 2019
@ebussieres
Copy link
Member

Good job !

@ebussieres ebussieres closed this Oct 21, 2019
@ebussieres ebussieres reopened this Oct 21, 2019
@ebussieres ebussieres merged commit e4dd679 into PebbleTemplates:master Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants