Rhino Mocks, Documentation samples

220 views
Skip to first unread message

Fabien Arcellier

unread,
Nov 29, 2009, 11:21:53 AM11/29/09
to Rhino.Mocks
Hello,

This visual studio solution contains samples for RhinoMock :
http://groups.google.com/group/rhinomocks/web/Documentation-Samples-RhinoMocks.zip

It contains exemple taken from the documentation :
http://www.ayende.com/wiki/Rhino+Mocks+Documentation.ashx

For each one, I wrote the minimum implementation to compile and pass
the test.

Indeed, lot of exemples written in the documentation are taken from
real project. There isn't any means to use them except to rewrite the
implementation.
It's really time consuming for a developer who'd like discover this
library.

I think it's very interesting to have such of things to save time for
developers who'd like to experiments.

Perhaps someone more experimented than me can correct some mistakes
and put in the documentation summary page.

The library used to compile the project are in the subdirectory lib
with license. Currently, it's :
- nunit 2.5.2
- RhinoMock 3.6

Remarks and difference with the documentation :

01-RhinoMocksIntroduction:
RhinoMocksIntroductionTest.cs
line 34 : You need to prefix the second param by ExpectedMessage=,
required by Nunit 2.5.2

04-RhinoMocksOrderedUnordered
RhinoMocksOrderedUnorderedTest.cs
line 73 : Dispose is a method without return. Implementation change
to be conform.
line 59 : Whatever the implementation, I don't succeed to pass this
test. I tried by deleting the Unordered calling and these methods
calling, it works fine.
Exception triggered :
RhinoMocksIntroduction.RhinoMocksOrderedUnorderedTest.MovingFundsUsingTransactions:
Rhino.Mocks.Exceptions.ExpectationViolationException :
IDatabaseManager.Dispose(); Expected #0, Actual #1.

06-RhinoMocksEvents
SubscribeToEventTest.cs
line 44 : I changed the implementation of test
VerifyingThatEventWasAttached_AAA. I am not very sure it's correct. If
someone could verify.

07-RhinoMocksIEventRaiser :
line 46 : We needs 2 params to raise an event

08-RhinoMocksProperties
RhinoMocksPropertiesTest.cs
Line 50 : Capacity property doesn't implement in IList, I used
ArrayList as a Mocking Class

Regards,
Fabien Arcellier

Tim Barcz

unread,
Nov 29, 2009, 2:14:17 PM11/29/09
to rhino...@googlegroups.com
Are you familiar with Git? Last week I created a GettingStarted solution that will ship with the source...would love to have these in that solution.

Tim


--

You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group.
To post to this group, send email to rhino...@googlegroups.com.
To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.





--
Tim Barcz
Microsoft C# MVP
Microsoft ASPInsider
http://timbarcz.devlicio.us
http://www.twitter.com/timbarcz

Fabien Arcellier

unread,
Nov 29, 2009, 2:22:26 PM11/29/09
to Rhino.Mocks
I am more familiar with subversion. I'd be similar.

Do you advise a client to use this system (compatible with windows) ?
Can you give me the url to connect to the repository ?

Fabien Arcellier

On Nov 29, 7:14 pm, Tim Barcz <timba...@gmail.com> wrote:
> Are you familiar with Git? Last week I created a GettingStarted solution
> that will ship with the source...would love to have these in that solution.
>
> Tim
>
> On Sun, Nov 29, 2009 at 10:21 AM, Fabien Arcellier <
>
>
>
>
>
> fabien.arcell...@gmail.com> wrote:
> > Hello,
>
> > This visual studio solution contains samples for RhinoMock :
>
> >http://groups.google.com/group/rhinomocks/web/Documentation-Samples-R...
> > rhinomocks+...@googlegroups.com<rhinomocks%2Bunsubscribe@googlegrou ps.com>
> > .

Tim Barcz

unread,
Nov 29, 2009, 2:36:52 PM11/29/09
to rhino...@googlegroups.com
You can use http://github.com/TimBarcz/rhino-mocks

If you don't know much about Git, it's a great "new" source control system.  While subversion remains king at this point, many many open source project have already or are working towards a move to git.

Tim

To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.





--
Tim Barcz
Microsoft C# MVP

Fabien Arcellier

unread,
Nov 29, 2009, 4:41:08 PM11/29/09
to Rhino.Mocks
I succeeded to clone your git repository.
However, I can't add file inside. I suppose I need to have some
autorisation.

My login est FabienArcellier in case of you must had permission to
write on your git.

If not, could you give me a tutoriel or some explanation how I must do
to comit something.

When I use g...@github.com:TimBarcz/rhino-mocks.git, it asks me a login
and a password.
I tried with my password I registred on the website. It fails.

Fabien

On 29 nov, 19:36, Tim Barcz <timba...@gmail.com> wrote:
> You can usehttp://github.com/TimBarcz/rhino-mocks
> > > > "Rhino.Mocks" group.> > > To post to this group, send email torhin...@googlegroups.com.
> > > > To unsubscribe from this group, send email to> > >rhinomocks+...@googlegroups.com<rhinomocks%2Bunsu...@googlegroups.com>
> > <rhinomocks%2Bunsubscribe@googlegrou ps.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/rhinomocks?hl=en.
>
> > > --
> > > Tim Barcz
> > > Microsoft C# MVP
> > > Microsoft ASPInsiderhttp://timbarcz.devlicio.ushttp://
> >www.twitter.com/timbarcz
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Rhino.Mocks" group.> To post to this group, send email torhin...@googlegroups.com.
> > To unsubscribe from this group, send email to>rhinomocks+...@googlegroups.com<rhinomocks%2Bunsu...@googlegroups.com>

Tim Barcz

unread,
Nov 29, 2009, 5:04:12 PM11/29/09
to rhino...@googlegroups.com
You need to "fork" my repository then you'll clone your own locally, then you'll have rights.  Once done you'll "push" back to your repostory and send me a "pull request" ... from which I can pull in your changes into my repository.

Clear as mud?

As for a tutorial check out Jeremy Skinner's wonderful tutorial he did for MvcContrib (http://mvccontrib.github.com/MvcContrib/).  I actually used this guide with ZERO git experience to create and submit a patch to the repository.

Tim

To post to this group, send email to rhino...@googlegroups.com.
To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.





--
Tim Barcz
Microsoft C# MVP

Stephen Price

unread,
Nov 29, 2009, 8:28:51 PM11/29/09
to rhino...@googlegroups.com
This is brilliant. Just was I was looking for. 

At a cursory glance, I notice that most of the tests seem to be Record/Play formatting rather than AAA. Still, it's great. All the unit tests pass too! :)

If this can be checked into the Rhinomocks source and made available via the documentation, as well as updated with examples of AAA style (perhaps the existing unit tests can have an example of each in them?) that would be fantastic for people learning Rhinomocks. 

many thanks!
Stephen

Tim Barcz

unread,
Nov 29, 2009, 8:35:41 PM11/29/09
to rhino...@googlegroups.com
This is underway. I think support for record/replay and AAA will be great

Tim

Fabien Arcellier

unread,
Dec 1, 2009, 2:23:26 PM12/1/09
to Rhino.Mocks
I only took the existant exemple to begin. At origin, this solution
has been done to learn RhinoMocks using from the documentation.
I read the wiki a little bit more. The documentation core is very
good. He just miss a training package.

It'd be great to finish it and publish the full documentation with
valid exemple on a website like codeproject.

It could be interesting to duplicate every methods with the classical
method and short method (AAA, record-replay, ...)
I'll try to do that.


Sorry Tim for the time I need to commit my work on github. I have some
issue to use it.

Tortoisegit displays everytime an authentification window during the
push. I didn't find any resource on the net for this issue.
I send a ticket to Github support.
http://support.github.com/discussions/repos/2054-authentification-on-my-repository-push

Fabien

On 30 nov, 01:35, Tim Barcz <timba...@gmail.com> wrote:
> This is underway. I think support for record/replay and AAA will be great
>
> Tim
>
>
>
> On Sun, Nov 29, 2009 at 7:28 PM, Stephen Price <lyt...@gmail.com> wrote:
> > This is brilliant. Just was I was looking for.
>
> > At a cursory glance, I notice that most of the tests seem to be Record/Play
> > formatting rather than AAA. Still, it's great. All the unit tests pass too!
> > :)
>
> > If this can be checked into the Rhinomocks source and made available via
> > the documentation, as well as updated with examples of AAA style (perhaps
> > the existing unit tests can have an example of each in them?) that would be
> > fantastic for people learning Rhinomocks.
>
> > many thanks!
> > Stephen
>
> > On Mon, Nov 30, 2009 at 12:21 AM, Fabien Arcellier <
> > fabien.arcell...@gmail.com> wrote:
>
> >> Hello,
>
> >> This visual studio solution contains samples for RhinoMock :
>
> >>http://groups.google.com/group/rhinomocks/web/Documentation-Samples-R...
> >> "Rhino.Mocks" group.>> To post to this group, send email torhin...@googlegroups.com.
> >> To unsubscribe from this group, send email to>>rhinomocks+...@googlegroups.com<rhinomocks%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/rhinomocks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Rhino.Mocks" group.> To post to this group, send email torhin...@googlegroups.com.
> > To unsubscribe from this group, send email to>rhinomocks+...@googlegroups.com<rhinomocks%2Bunsu...@googlegroups.com>
> > .

Fabien Arcellier

unread,
Dec 8, 2009, 12:59:15 PM12/8/09
to Rhino.Mocks
Hi,

I push the Documentation directory on github.

http://github.com/FabienArcellier/rhino-mocks/tree/master/Rhino.Mocks.GettingStarted/Documentation/

I try to write every test in double, one following the documentation
aspect, one following the AAA pattern.

Feel free to do any remark about the result.

Do you think I'd have to separate classic code and code following the
AAA pattern in two solution ?

Regards,
Fabien Arcellier


On Dec 1, 7:23 pm, Fabien Arcellier <fabien.arcell...@gmail.com>
wrote:
> I only took the existant exemple to begin. At origin, this solution
> has been done to learn RhinoMocks using from the documentation.
> I read the wiki a little bit more. The documentation core is very
> good. He just miss a training package.
>
> It'd be great to finish it and publish the full documentation with
> valid exemple on a website like codeproject.
>
> It could be interesting to duplicate every methods with the classical
> method and short method (AAA, record-replay, ...)
> I'll try to do that.
>
> Sorry Tim for the time I need to commit my work on github. I have some
> issue to use it.
>
> Tortoisegit displays everytime an authentification window during the
> push. I didn't find any resource on the net for this issue.
> I send a ticket to Github support.http://support.github.com/discussions/repos/2054-authentification-on-...
> > >> To unsubscribe from this group, send email to>>rhinomocks+...@googlegroups.com<rhinomocks%2Bunsubscribe@google groups.com>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/rhinomocks?hl=en.
>
> > >  --
> > > You received this message because you are subscribed to the Google Groups
> > > "Rhino.Mocks" group.> To post to this group, send email torhin...@googlegroups.com.
> > > To unsubscribe from this group, send email to>rhinomocks+...@googlegroups.com<rhinomocks%2Bunsubscribe@googleg roups.com>

Ayende Rahien

unread,
Dec 9, 2009, 4:49:10 AM12/9/09
to rhino...@googlegroups.com
I merged your changed with my copy on github, thanks!

To post to this group, send email to rhino...@googlegroups.com.
To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages