From: Rhino on 18 May 2010 20:48 Very basic question: if a method becomes deprecated over time, are its unit tests retained in the Test classes on the off chance that they may become relevant again? Do they get commented out or are they left to run? Am I safe in assuming that once the method is actually removed from the class, the test cases are deleted as well? As Java gets more mature, it's not unusual to see deprecated methods from time to time. Have any methods in the Java API actually been deleted or are they all just kept around in a deprecated state? What about Java classes outside of the Java API? Just curious.... -- Rhino
From: Mike Schilling on 18 May 2010 21:02 Rhino wrote: > Very basic question: if a method becomes deprecated over time, are > its unit tests retained in the Test classes on the off chance that > they may become relevant again? Do they get commented out or are they > left to run? Since a method's being deprecated doesn't mean that no one calls it , it still need to be tested.
From: Arne Vajhøj on 18 May 2010 21:16 On 18-05-2010 20:48, Rhino wrote: > Very basic question: if a method becomes deprecated over time, are its unit > tests retained in the Test classes on the off chance that they may become > relevant again? Do they get commented out or are they left to run? Continue to test. > Am I safe in assuming that once the method is actually removed from the > class, the test cases are deleted as well? Yes. Because the test case would neither run nor compile. > As Java gets more mature, it's not unusual to see deprecated methods from > time to time. Have any methods in the Java API actually been deleted or are > they all just kept around in a deprecated state? I am not aware of any. > What about Java classes > outside of the Java API? Some open source projects has made incompatible upgrades. Arne
From: Tom Anderson on 19 May 2010 08:43 On Wed, 19 May 2010, Rhino wrote: > Very basic question: if a method becomes deprecated over time, are its > unit tests retained in the Test classes on the off chance that they may > become relevant again? Yes. > Do they get commented out or are they left to run? Left to run. > Am I safe in assuming that once the method is actually removed from the > class, the test cases are deleted as well? Yes. > As Java gets more mature, it's not unusual to see deprecated methods > from time to time. Have any methods in the Java API actually been > deleted or are they all just kept around in a deprecated state? I can't think of any that have been removed. > What about Java classes outside of the Java API? Just curious.... To take one example, HtmlUnit has made numerous backward-incompatible API changes, removing methods, renaming them, moving them, etc. Their process (IIRC) is to deprecate in one release, then remove in the next. tom -- The square-jawed homunculi of Tommy Hilfiger ads make every day an existential holocaust. -- Scary Go Round
|
Pages: 1 Prev: Up to date SOAP implementation Next: change ISO8859-1 to GB2312 |