Hi,
I am trying to understand how classes in smalltalk projects are named. Something I can hardly understand is why the root class of the Test hierarchy is named TestAsserter? What is the intention behind the term Asserter? Wouldn’t it be more appropriate to name it AbstractTest since most classes of this hierarchy are Tests? Many thanks in advance Abdelghani |
I am neither an expert nor do I know what the reasoning behind the
naming initially was. But my initial thought about your question was that a single method named tesXXX is actually a test, and the class containing all these tests is intended to check the assertions that are formulated in the individual tests. So the TestCase contains a number of tests and makes sure they can be run and probed. Not sure this is related to truth in any way, however... Joachim |
In reply to this post by Pharo Smalltalk Users mailing list
Hi Abdelghani,
I don’t have immediate access to earlier versions of SUnit (oh, that it were on GitHub!), but my recollection is that TestCase was originally a root class but duplicate code with TestResource inspired a refactoring that called for a common superclass. The name TestAsserter was chosen to reflect the common behavior. James
|
Hi James,
Thanks a lot for this very interesting historical perspective :) Still I think TestAsserter is not the most intuitive name. Asserter is not even an English word if I am not mistaken. Thanks again Abdelghani
Dr. Abdelghani Alidra Enseignant-chercheur Université 20 août 1955 SKIKDA-ALGÉRIE Mob:+ 213 550 453 391 |
Administrator
|
Pharo Smalltalk Users mailing list wrote
> Still I think TestAsserter is not the most intuitive name. Asserter is not > even an English word if I am not mistaken. It came up in a few dictionaries in a google search, but clearly not the most common. My understanding is that [Verb]-er names are usually common names for roles (e.g. in dependency injection), but a code smell for object names. On the other hand (and not having the code in front of me), if it is an object which asserts, then maybe okay? Do you have any suggestions for a better name? ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
On Thu, 11 Oct 2018 at 21:52, Sean P. DeNigris <[hidden email]> wrote: Pharo Smalltalk Users mailing list wrote The good (and bad) thing about English (since contributes to its complexity) is all rules it adopted from many influences, so its its quite flexible about made up words. As Sean said, TestAsserter satisfies a particular rule. I can't think of a gooder alternative. cheers -ben It came up in a few dictionaries in a google search, but clearly not the |
Administrator
|
>gooder
he he ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
Free forum by Nabble | Edit this page |