Why is the root class of tests named TestAsserter?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is the root class of tests named TestAsserter?

Pharo Smalltalk Users mailing list
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
Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

jtuchel
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

Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

jgfoster
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

On Oct 9, 2018, at 8:12 AM, Alidra Abdelghani via Pharo-users <[hidden email]> wrote:


From: Alidra Abdelghani <[hidden email]>
Subject: Why is the root class of tests named TestAsserter?
Date: October 9, 2018 at 8:12:11 AM PDT


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




Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

Pharo Smalltalk Users mailing list
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

On 10 Oct 2018, at 1:57 pm, James Foster <[hidden email]> wrote:

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

On Oct 9, 2018, at 8:12 AM, Alidra Abdelghani via Pharo-users <[hidden email]> wrote:


From: Alidra Abdelghani <[hidden email]>
Subject: Why is the root class of tests named TestAsserter?
Date: October 9, 2018 at 8:12:11 AM PDT


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





Dr. Abdelghani Alidra 
Enseignant-chercheur
Université 20 août 1955
SKIKDA-ALGÉRIE 
Mob:+ 213 550 453 391

Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

Sean P. DeNigris
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
Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

Ben Coman
On Thu, 11 Oct 2018 at 21:52, Sean P. DeNigris <[hidden email]> wrote:
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.

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
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?
Reply | Threaded
Open this post in threaded view
|

Re: Why is the root class of tests named TestAsserter?

Sean P. DeNigris
Administrator
>gooder
he he



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Cheers,
Sean