Skip to content

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