Еще про юнит-тестирование прайвет методов
May. 19th, 2016 12:18 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Во, нашел совет на СО
The best way to test a private method is via another public method.
If this cannot be done, then one of the following conditions is true:
1 The private method is dead code
2 There is a design smell near the class that you are testing
3 The method that you are trying to test should not be private
http://stackoverflow.com/questions/34571/how-to-test-a-class-that-has-private-methods-fields-or-inner-classes
The best way to test a private method is via another public method.
If this cannot be done, then one of the following conditions is true:
1 The private method is dead code
2 There is a design smell near the class that you are testing
3 The method that you are trying to test should not be private
http://stackoverflow.com/questions/34571/how-to-test-a-class-that-has-private-methods-fields-or-inner-classes
no subject
Date: 2016-05-19 02:53 pm (UTC)no subject
Date: 2016-05-19 04:44 pm (UTC)no subject
Date: 2016-05-20 09:10 am (UTC)no subject
Date: 2016-05-20 05:48 pm (UTC)