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

Refactor IntrospectionContextTestImpl in SuppressPropertiesBeanIntros… #96

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

Conversation

wx930910
Copy link

@wx930910 wx930910 commented Sep 6, 2021

Fix BEANUTILS-551

Description

Replace test class IntrospectionContextTestImpl by mocking object and improve test design


Motivation
  • Decouple test class IntrospectionContextTestImpl from production interface IntrospectionContext.
  • Extract attribute into test cases to make test condition more explict.
  • Make test logic more clear by using method stub instead of method overriding.

Key changed/added classes in this PR
  • Created mocking object to replace test subclass IntrospectionContextTestImpl, decoupled test from production code.
  • Extract removedProperties as a local variable to improve test logic and make test condition more explict.
  • Make test logic more clear by using method stub instead of method overriding.
  • Add Mockito dependency

@garydgregory
Copy link
Member

I'm going to say no here for the same reason as for the similar PRs proposed in other Commons components: this makes the code harder to follow and maintain and does not offer benefits.

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.

3 participants