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

JXPATH-198: Refactor Context to improve test logic #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wx930910
Copy link

JIRA

Fixes XPATH-198

Description

Refactor test class Context


Motivation

  • Decouple test class Context from production interface ExpressionContext.
  • Remove the redundant test child class Context
  • Remove the redundant overridden methods that return default values.
  • Make testing logic more explict.

Key changed/added classes in this PR
  • Created mocking object to replace test subclass Context, decoupled test from production code.
  • Created a method that return the mocking object for reuse purpose.
  • Use method stub to replace method overriding to control mocking object's behavior.
  • Remove redundant overridden methods to improve test logic.
  • Add Mockito dependency.

@garydgregory
Copy link
Member

Exact same comment as apache/commons-codec#94 (comment)

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