Renaming the 'Assertions' class

9 views
Skip to first unread message

Alex Ruiz

unread,
Aug 24, 2012, 2:53:15 AM8/24/12
to easytes...@googlegroups.com
Hey folks,

Something that I really, really like is the single entry point for all FEST-Assert-things in the "Assertions" class. Joel, this is just awesome! It makes *a lot* easier to do things with FEST.

Now, here is the thing. The class "Assertions" is now much more than just assertions, it has pretty much everything, but its name does not reflect that. What the class is doing is great but the name kind of sucks (well, at some point it made sense to call it "Assertions" though.)

I like how Mockito does this. The entry point is just "Mockito". I was thinking we can borrow the idea and rename the "Assertion" class to "FEST" (I mean it, "FEST", not "Fest"). I thought "FestAssert" since there are other modules in the FEST project, but that's too long.

What do you think?

Cheers,
-Alex

Joel Costigliola

unread,
Aug 24, 2012, 3:53:01 AM8/24/12
to easytes...@googlegroups.com
I agree that Assertions is now more than assertions and thus need to be renamed, I did not changed it at the time to limit breaking changes and that was a thing I wanted to discuss with you guys (Alex thanks for bringing this up).

I personally would go for FestAssert because if we use FEST and later on want to set a single entry point for Fest reflect, what will we choose ? It also seems natural because it's Fest Assert project.

I don't think the name being long is a real problem, at least if you configure Eclipse properly as you can define favorites static import (preferences > Java > Editor > Content Assist > Favorites). I'm sure you can do it also in others IDE.

My 2cts,

Joel

--
You received this message because you are subscribed to the Google Groups "easytesting-dev" group.
To post to this group, send email to easytes...@googlegroups.com.
To unsubscribe from this group, send email to easytesting-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Ruiz

unread,
Aug 24, 2012, 12:02:39 PM8/24/12
to easytes...@googlegroups.com
Hey Joel,

The thing about 'FestAssert' is readability for folks that do not like static imports (to my surprise, there are many...he he)

So, it would read like this:

FestAssert.assertThat

and "assert" is in two places.

It would be nicer to have:

FEST.assertThat

Also, for FEST-Reflect, it is such a small project that I don't think we will ever change the name of the API entry point.

Oh, about breaking changes. It's OK to introduce them for 2 reasons: this is 2.x, so no reason to be backwards compatible with 1.x and also, we are in milestones, no final release yet. The whole point of 2.x was to do things right (if there is such a thing) and learn from mistakes make in 1.x.

WDYT?

-Alex 

Joel Costigliola

unread,
Aug 24, 2012, 12:08:35 PM8/24/12
to easytes...@googlegroups.com
I agree with your point, without static import, using FestAssert.assertThat is not very elegant/fluent so let's go for FEST.assertThat.
Reply all
Reply to author
Forward
0 new messages