wx930910 opened a new pull request #396: URL: https://github.com/apache/opennlp/pull/396
### Jira - [OPENNLP-1338](https://issues.apache.org/jira/browse/OPENNLP-1338) ### Description #### Replace test class [DummyNameFinder](https://github.com/apache/opennlp/blob/7286f9c804b65a4a1d771d3c984ea76516fc8141/opennlp-tools/src/test/java/opennlp/tools/namefind/TokenNameFinderEvaluatorTest.java#L95) by mocking object and improve test design <hr> ##### Motivation - Decouple test class `DummyNameFinder` from production interface `TokenNameFinder`. - Remove the redundant test child class `PrintingVisitor` - Remove the redundant overridden methods `clearAdaptiveData()` - Make testing logic more explict. <hr> ##### Key changed/added classes in this PR * Created mocking object to replace test subclass `DummyNameFinder`, decoupled test from production code. * Created method that return the mocking object for code reuse. * Add Mockito dependency. <hr> ### For all changes: - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [x] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? - [x] Is your initial contribution a single, squashed commit? ### For code changes: - [x] Have you ensured that the full suite of tests is executed via mvn clean install at the root opennlp folder? - [x] Have you written or updated unit tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in opennlp folder? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found in opennlp folder? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
