On lun, 2008-01-14 at 14:11 -0800, Sebastien Pouliot wrote:
> Hello,
>
> Daniel, from GHOP, contributed quite a few rules recently. He also had
> some ideas around how unit tests could be simplified - and I didn't
> hesitate a bit to create him a task to do just that ;-)
Cool! I have reviewed the files, and it's a good work.
> Here are the details...
> http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=75
>
> Any comments ?
Yes, first of all, sorry for the delayment answering the e-mail. I
have just finished my first exam now.
Second, my 2 cents:
* public abstract class MethodRuleTest<TMethodRule>
where TMethodRule : IMethodRule, new ()
I like a lot this code.
* About the AssertSuccess or AssertFailure methods, I would like name
that methdos as "AssertRuleSuccess" or "AssertRuleFailure". IMHO is more
concrete and we will improve the test readability.
* The others "Assert[Success | Failure]" with MessageType as parameter,
perhaps would be a better name "AssertMessageType" or "AssertMessage".
* And the same for the expectedCount one, other name could be
"AssertViolationsCount".
And that's all, what do you think about the suggestions?
Good work! :)
Néstor.
On mié, 2008-01-16 at 06:31 -0800, Sebastien Pouliot wrote:
> Hola Néstor,
> >
> > Yes, first of all, sorry for the delayment answering the e-mail. I
> > have just finished my first exam now.
>
> No problem, I knew you were busy and I hope everything went fine with
> your exam :)
Thanks you very much :)
> > * The others "Assert[Success | Failure]" with MessageType as parameter,
> > perhaps would be a better name "AssertMessageType" or "AssertMessage".
> >
> > * And the same for the expectedCount one, other name could be
> > "AssertViolationsCount".
> >
> > And that's all, what do you think about the suggestions?
>
> I think that Daniel's overloads should be enough, unless you have some
> thing specific in mind ?
No, I haven't seen those methods as overloads because I'm used to check
first the rule success or failure, after the number of violations and
finally the message types.
Then, with these new methods, I can check all in one line. This 2 last
comments doesn't make sense, sorry.
> Good luck with your next exams!
Thanks you another time :)
Néstor.