[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jfw] Re: Private methods should not be unit-tested




On Friday, March 14, 2014 4:38:20 PM UTC-5, Herman Peeren wrote:
Private methods should not be unit-tested. Code quality would improve if we delete those tests.

Herman - I test public methods only (not protected or private) because my API is based on public methods. So, being able to start from scratch, I used this theory. (Though I disagree that code quality automatically improves deleting unnecessary tests.)

In this case, if I were motivated to follow an approach of only testing the API for Joomla, I would first create the needed PR's to cover the public and protected methods.

Then, with full coverage in place, I would follow with a PR that removed private tests. That's when this discussion makes sense, not before.


--
Framework source code: https://github.com/joomla/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.