Skip to content

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