You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/09/06 02:46:26 UTC

[GitHub] [commons-beanutils] wx930910 opened a new pull request #96: Refactor IntrospectionContextTestImpl in SuppressPropertiesBeanIntros…

wx930910 opened a new pull request #96:
URL: https://github.com/apache/commons-beanutils/pull/96


   Fix [BEANUTILS-551](https://issues.apache.org/jira/browse/BEANUTILS-551)
   
   ### Description
   
   #### Replace test class [IntrospectionContextTestImpl](https://github.com/apache/commons-beanutils/blob/7196d86767e37a382329bb3b087d0f58c7301caf/src/test/java/org/apache/commons/beanutils2/SuppressPropertiesBeanIntrospectorTestCase.java#L101) by mocking object and improve test design
   <hr>
   
   ##### 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.
   
   <hr>
   
   ##### 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
   
   <hr>


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-beanutils] garydgregory commented on pull request #96: Refactor IntrospectionContextTestImpl in SuppressPropertiesBeanIntros…

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #96:
URL: https://github.com/apache/commons-beanutils/pull/96#issuecomment-917177040


   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.


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org