You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(17) |
Aug
(6) |
Sep
(13) |
Oct
|
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
(99) |
Mar
(42) |
Apr
(8) |
May
(17) |
Jun
(1) |
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
(26) |
Dec
|
| 2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(21) |
Jun
|
Jul
(2) |
Aug
(21) |
Sep
(20) |
Oct
(33) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(45) |
Feb
(8) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(1) |
Dec
|
|
From: Steve M. <Ste...@ty...> - 2007-05-29 19:14:12
|
I think it's good that you've split it up since now that I've looked
back over, there's stuff (such as signed code) that doesn't need to go
in. Specifically to the comments below:
* MockObject.RemoveEventHandler -- Yes, that is a typo on my part.
* RaiseEvent -- Events could and still can contain any signature, the
(object sender, EventArgs e) is only a convention. There is nothing to
stop you from raising an event with different parameters. The only
requirement is that they they be void return values. This is the same
limitation for any multi-cast delegate.
* throwing on no-attached events -- I agree that it should not throw, I
can't remember my thinking on that, but it was probably assuming that
the tester wanted to know there was nothing attached.
* Fire.Event as IAction, I think that the IAction should be an addition
to the straight Fire code that exists, I hadn't considered that
approach, but it would clean up some of my current tests.
As far as the key, I can't give out my key for the build. =20
You can either ignore that, or generate an official Nmock2.key for
strong-naming purposes. =20
I don't know where the rest of the community stands on having a public
key for the build.
-----Original Message-----
From: nmo...@li...
[mailto:nmo...@li...] On Behalf Of Mike
Capp
Sent: Tuesday, May 29, 2007 1:36 PM
To: Steve Mitcham
Cc: nmo...@li...
Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
Hi Steve,
Not dead, it just seems that way... I had a few reports from QA on
Friday that needed looking at, and a bank holiday yesterday.
I'm splitting your patch into smaller, more specific commits so that
it's easier for people to see what's changing and why. The ordering
bugfix is already committed, and I'm looking at the event-raising
feature now. (The MockObjectFactory will go last since it'll probably
be the most contentious.)
A few questions/comments:
* MockObject.RemoveEventHandler was only removing handlers if it
didn't contain them. Can I assume this was a simple copy-and-paste-o,
rather than anything more subtle?
* The signature for IMockObject.RaiseEvent looks a bit fuzzier than it
needs to be. We do very little with events here, so I'm not too
informed on the subject, but my NET 1.1 docs say that an event handler
delegate must have a signature of the form "void Foo(object sender,
EventArgs e)". Should RaiseEvent take one argument e, of type
(assignable to) EventArgs, and pass (this, e) to each handler? Or have
things been relaxed in NET 2.0?
* Not convinced that MockObject.RaiseEvent should throw if no handlers
have been attached. This isn't the behaviour of 'real' events.
* The patch's Fire.Event(name).On(mock).With(args) follows the same
syntactic pattern as Expect or Stub. I'm not sure we need that same
level of flexibility, particularly if the (object, EventArgs) rule for
handler delegates is still in force, and the With clause is
potentially misleading since it's not doing matching. Also, this
pattern only allows events to be raised out of a clear blue sky. Would
it be also be useful to support events firing in response to a mocked
method call? If so, how about implementing it as an IAction instead?
F'rinstance:
// Out of a clear blue sky
new EventAction("Beep", beepArgs).RaiseOn(myMock); // or add
syntactic sugar to taste
// Triggered by method call
Expect.Once.On(myMock)
.Method("Foo").WithAnyArguments
.Will(Raise.Event("Beep", beepArgs), Return.Value("something"));
Looks like a straightforward tweak, and it composes nicely with other
actions.
* I'm going to need your nmock2.key at some point; it wasn't in the
patch or zip. I'm pretty sure that's the last of the missing files,
though.
cheers
Mike
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NMock-two-dev mailing list
NMo...@li...
https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
|
|
From: Mike C. <mik...@gm...> - 2007-05-29 18:36:22
|
Hi Steve,
Not dead, it just seems that way... I had a few reports from QA on
Friday that needed looking at, and a bank holiday yesterday.
I'm splitting your patch into smaller, more specific commits so that
it's easier for people to see what's changing and why. The ordering
bugfix is already committed, and I'm looking at the event-raising
feature now. (The MockObjectFactory will go last since it'll probably
be the most contentious.)
A few questions/comments:
* MockObject.RemoveEventHandler was only removing handlers if it
didn't contain them. Can I assume this was a simple copy-and-paste-o,
rather than anything more subtle?
* The signature for IMockObject.RaiseEvent looks a bit fuzzier than it
needs to be. We do very little with events here, so I'm not too
informed on the subject, but my NET 1.1 docs say that an event handler
delegate must have a signature of the form "void Foo(object sender,
EventArgs e)". Should RaiseEvent take one argument e, of type
(assignable to) EventArgs, and pass (this, e) to each handler? Or have
things been relaxed in NET 2.0?
* Not convinced that MockObject.RaiseEvent should throw if no handlers
have been attached. This isn't the behaviour of 'real' events.
* The patch's Fire.Event(name).On(mock).With(args) follows the same
syntactic pattern as Expect or Stub. I'm not sure we need that same
level of flexibility, particularly if the (object, EventArgs) rule for
handler delegates is still in force, and the With clause is
potentially misleading since it's not doing matching. Also, this
pattern only allows events to be raised out of a clear blue sky. Would
it be also be useful to support events firing in response to a mocked
method call? If so, how about implementing it as an IAction instead?
F'rinstance:
// Out of a clear blue sky
new EventAction("Beep", beepArgs).RaiseOn(myMock); // or add
syntactic sugar to taste
// Triggered by method call
Expect.Once.On(myMock)
.Method("Foo").WithAnyArguments
.Will(Raise.Event("Beep", beepArgs), Return.Value("something"));
Looks like a straightforward tweak, and it composes nicely with other actions.
* I'm going to need your nmock2.key at some point; it wasn't in the
patch or zip. I'm pretty sure that's the last of the missing files,
though.
cheers
Mike
|
|
From: M. S. F. <va...@sc...> - 2007-05-15 02:27:14
|
Okay. Steve sent me his code and I was able to run it with all tests passing (after I fixed an unrelated bug) on Mono version 1.2.2 on my Intel Mac. So, I don't think that this bug is NMock related, and we should post a FAQ or a warning about it. On May 14, 2007, at 10:54 AM, M. Scott Ford wrote: > If you zip up your version and send it to me privately, I can try on > Mono this evening. > > Steve Mitcham wrote: >> I haven't done anything with Mono yet >> >> -----Original Message----- >> From: nmo...@li... >> [mailto:nmo...@li...] On Behalf Of M. >> Scott Ford >> Sent: Monday, May 14, 2007 9:48 AM >> To: NMock2 Development Discussion >> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify >> >> Yeah. As I said in my blog, I think that this is a problem with >> the .Net >> >> framework, and not with NMock. Have you tried to see if you can >> reproduce the problem with Mono? >> >> Steve Mitcham wrote: >> >>> I copied your test case from your blog into the acceptance tests >>> on my >>> version and the casting problem is still exhibited. >>> >>> -----Original Message----- >>> From: nmo...@li... >>> [mailto:nmo...@li...] On Behalf Of M. >>> Scott Ford >>> Sent: Monday, May 14, 2007 9:11 AM >>> To: NMock2 Development Discussion >>> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify >>> >>> I wrote a few blog[1] posts[2] about this a long time ago. I am not >>> >> sure >> >>> if they are still relevant, but they may help. >>> >>> [1]: http://vaderpi.scottandlaurie.com/blog/?p=184 >>> [2]: http://vaderpi.scottandlaurie.com/blog/?p=188 >>> >>> Mike Capp wrote: >>> >>> >>>> Hi Steve, >>>> >>>> I found your old mails on this subject while poking through the >>>> nmock >>>> list archives regarding a similar issue - an >>>> InvalidCastException on >>>> >>>> ArrayList list = new ArrayList(); >>>> list.Add(mockery.NewMock(typeof(IFoo))); >>>> IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo)); >>>> >>>> which I suspect has the same root cause as your IServiceContainer >>>> woes. Unfortunately, SourceForge's web archives don't include >>>> patches >>>> attached to mails (I only joined the project recently and so don't >>>> have the originals) and I didn't have your email until it popped up >>>> >> in >> >>>> this thread. Do you by any chance still have them handy? I'm not a >>>> project admin and so can't give you commit access, but I should be >>>> able to apply your fixes and check them in. >>>> >>>> cheers >>>> Mike >>>> >>>> >>>> On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: >>>> >>>> >>>> >>>>> I've submitted a patch to a major issue that I've come up against, >>>>> >>>>> >>> that >>> >>> >>>>> I believe covers an open error in the bug list, several times only >>>>> >> to >> >>>>> have the patch submission be completely ignored. I gave up sending >>>>> information to the lists a long time ago due to this behavior. I >>>>> >> can >> >>>>> understand a patch being rejected, but I got no feedback >>>>> whatsoever >>>>> >>>>> >>> to >>> >>> >>>>> my attempts. This occurred over the course of several months >>>>> about >>>>> >> a >> >>>>> year ago. The issue still exists. I don't have time to look >>>>> up the >>>>> exact defect I'm talking about, however, the symptom of the >>>>> problem >>>>> >>>>> >>> I'm >>> >>> >>>>> experiencing boils down to the following test: >>>>> >>>>> [Test] >>>>> public void MockObjectsCanBeContainedInServiceContainer() >>>>> { >>>>> Mockery mockery = new Mockery(); >>>>> ServiceContainer container = new >>>>> ServiceContainer(); >>>>> IMockedType mockedType = mockery.NewMock(typeof >>>>> (IMockedType)) as IMockedType; >>>>> >>>>> container.AddService(typeof >>>>> >>>>> >>> (IMockedType),mockedType); >>> >>> >> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); >> >>>>> } >>>>> >>>>> I have a patch that my company uses that fixes this issue and also >>>>> allows for the following functionality: >>>>> >>>>> [Test] >>>>> public void EventsCanBeRaisedDuringTests() >>>>> { >>>>> m_listenerMessage = null; >>>>> Mockery mocks = new Mockery(); >>>>> Announcer announcer = (Announcer) >>>>> mocks.NewMock(typeof(Announcer)); >>>>> >>>>> >>>>> >>>>> >>> Expect.Once.On(announcer).EventAdd("Listeners", >>> >>> >>>>> new Listener(DummyListener)); >>>>> >>>>> announcer.Listeners += new >>>>> Listener(DummyListener); >>>>> >>>>> >>>>> >>>>> >>> Fire.Event("Listeners").On(announcer).With("Test >>> >>> >>>>> Message"); >>>>> >>>>> Assert.AreEqual("Test >>>>> Message",m_listenerMessage); >>>>> } >>>>> >>>>> >>>>> Finally, I have a patch to an issue raise several months ago >>>>> >>>>> >>> concerning >>> >>> >>>>> Verification of expectations when ordered expectations are used, >>>>> >> also >> >>>>> >>>>> >>> a >>> >>> >>>>> major problem that remains unpatched to date as far as I can tell. >>>>> >>>>> >>>>> >>>> >>>> >> --------------------------------------------------------------------- >> --- >> >>> - >>> >>> >>>> This SF.net email is sponsored by DB2 Express >>>> Download DB2 Express C - the FREE version of DB2 express and take >>>> control of your XML. No limits. Just data. Click to get it now. >>>> http://sourceforge.net/powerbar/db2/ >>>> _______________________________________________ >>>> NMock-two-dev mailing list >>>> NMo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >>>> >>>> >>>> >>> >>> >>> >> --------------------------------------------------------------------- >> --- >> >>> - >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> NMock-two-dev mailing list >>> NMo...@li... >>> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >>> >>> >>> >> --------------------------------------------------------------------- >> --- >> - >> >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> NMock-two-dev mailing list >>> NMo...@li... >>> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >>> >>> >> >> >> >> --------------------------------------------------------------------- >> --- >> - >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev |
|
From: M. S. F. <va...@sc...> - 2007-05-14 14:54:14
|
If you zip up your version and send it to me privately, I can try on Mono this evening. Steve Mitcham wrote: > I haven't done anything with Mono yet > > -----Original Message----- > From: nmo...@li... > [mailto:nmo...@li...] On Behalf Of M. > Scott Ford > Sent: Monday, May 14, 2007 9:48 AM > To: NMock2 Development Discussion > Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify > > Yeah. As I said in my blog, I think that this is a problem with the .Net > > framework, and not with NMock. Have you tried to see if you can > reproduce the problem with Mono? > > Steve Mitcham wrote: > >> I copied your test case from your blog into the acceptance tests on my >> version and the casting problem is still exhibited. >> >> -----Original Message----- >> From: nmo...@li... >> [mailto:nmo...@li...] On Behalf Of M. >> Scott Ford >> Sent: Monday, May 14, 2007 9:11 AM >> To: NMock2 Development Discussion >> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify >> >> I wrote a few blog[1] posts[2] about this a long time ago. I am not >> > sure > >> if they are still relevant, but they may help. >> >> [1]: http://vaderpi.scottandlaurie.com/blog/?p=184 >> [2]: http://vaderpi.scottandlaurie.com/blog/?p=188 >> >> Mike Capp wrote: >> >> >>> Hi Steve, >>> >>> I found your old mails on this subject while poking through the nmock >>> list archives regarding a similar issue - an InvalidCastException on >>> >>> ArrayList list = new ArrayList(); >>> list.Add(mockery.NewMock(typeof(IFoo))); >>> IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo)); >>> >>> which I suspect has the same root cause as your IServiceContainer >>> woes. Unfortunately, SourceForge's web archives don't include patches >>> attached to mails (I only joined the project recently and so don't >>> have the originals) and I didn't have your email until it popped up >>> > in > >>> this thread. Do you by any chance still have them handy? I'm not a >>> project admin and so can't give you commit access, but I should be >>> able to apply your fixes and check them in. >>> >>> cheers >>> Mike >>> >>> >>> On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: >>> >>> >>> >>>> I've submitted a patch to a major issue that I've come up against, >>>> >>>> >> that >> >> >>>> I believe covers an open error in the bug list, several times only >>>> > to > >>>> have the patch submission be completely ignored. I gave up sending >>>> information to the lists a long time ago due to this behavior. I >>>> > can > >>>> understand a patch being rejected, but I got no feedback whatsoever >>>> >>>> >> to >> >> >>>> my attempts. This occurred over the course of several months about >>>> > a > >>>> year ago. The issue still exists. I don't have time to look up the >>>> exact defect I'm talking about, however, the symptom of the problem >>>> >>>> >> I'm >> >> >>>> experiencing boils down to the following test: >>>> >>>> [Test] >>>> public void MockObjectsCanBeContainedInServiceContainer() >>>> { >>>> Mockery mockery = new Mockery(); >>>> ServiceContainer container = new ServiceContainer(); >>>> IMockedType mockedType = mockery.NewMock(typeof >>>> (IMockedType)) as IMockedType; >>>> >>>> container.AddService(typeof >>>> >>>> >> (IMockedType),mockedType); >> >> > Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); > >>>> } >>>> >>>> I have a patch that my company uses that fixes this issue and also >>>> allows for the following functionality: >>>> >>>> [Test] >>>> public void EventsCanBeRaisedDuringTests() >>>> { >>>> m_listenerMessage = null; >>>> Mockery mocks = new Mockery(); >>>> Announcer announcer = (Announcer) >>>> mocks.NewMock(typeof(Announcer)); >>>> >>>> >>>> >>>> >> Expect.Once.On(announcer).EventAdd("Listeners", >> >> >>>> new Listener(DummyListener)); >>>> >>>> announcer.Listeners += new >>>> Listener(DummyListener); >>>> >>>> >>>> >>>> >> Fire.Event("Listeners").On(announcer).With("Test >> >> >>>> Message"); >>>> >>>> Assert.AreEqual("Test >>>> Message",m_listenerMessage); >>>> } >>>> >>>> >>>> Finally, I have a patch to an issue raise several months ago >>>> >>>> >> concerning >> >> >>>> Verification of expectations when ordered expectations are used, >>>> > also > >>>> >>>> >> a >> >> >>>> major problem that remains unpatched to date as far as I can tell. >>>> >>>> >>>> >>> >>> > ------------------------------------------------------------------------ > >> - >> >> >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> NMock-two-dev mailing list >>> NMo...@li... >>> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >>> >>> >>> >> >> >> > ------------------------------------------------------------------------ > >> - >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> >> >> > ------------------------------------------------------------------------ > - > >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> >> > > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > |
|
From: Steve M. <Ste...@ty...> - 2007-05-14 14:51:34
|
I haven't done anything with Mono yet -----Original Message----- From: nmo...@li... [mailto:nmo...@li...] On Behalf Of M. Scott Ford Sent: Monday, May 14, 2007 9:48 AM To: NMock2 Development Discussion Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify Yeah. As I said in my blog, I think that this is a problem with the .Net framework, and not with NMock. Have you tried to see if you can=20 reproduce the problem with Mono? Steve Mitcham wrote: > I copied your test case from your blog into the acceptance tests on my > version and the casting problem is still exhibited. > > -----Original Message----- > From: nmo...@li... > [mailto:nmo...@li...] On Behalf Of M. > Scott Ford > Sent: Monday, May 14, 2007 9:11 AM > To: NMock2 Development Discussion > Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify > > I wrote a few blog[1] posts[2] about this a long time ago. I am not sure > > if they are still relevant, but they may help. > > [1]: http://vaderpi.scottandlaurie.com/blog/?p=3D184 > [2]: http://vaderpi.scottandlaurie.com/blog/?p=3D188 > > Mike Capp wrote: > =20 >> Hi Steve, >> >> I found your old mails on this subject while poking through the nmock >> list archives regarding a similar issue - an InvalidCastException on >> >> ArrayList list =3D new ArrayList(); >> list.Add(mockery.NewMock(typeof(IFoo))); >> IFoo[] array =3D (IFoo[]) list.ToArray(typeof(IFoo)); >> >> which I suspect has the same root cause as your IServiceContainer >> woes. Unfortunately, SourceForge's web archives don't include patches >> attached to mails (I only joined the project recently and so don't >> have the originals) and I didn't have your email until it popped up in >> this thread. Do you by any chance still have them handy? I'm not a >> project admin and so can't give you commit access, but I should be >> able to apply your fixes and check them in. >> >> cheers >> Mike >> >> >> On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: >> =20 >> =20 >>> I've submitted a patch to a major issue that I've come up against, >>> =20 > that > =20 >>> I believe covers an open error in the bug list, several times only to >>> have the patch submission be completely ignored. I gave up sending >>> information to the lists a long time ago due to this behavior. I can >>> understand a patch being rejected, but I got no feedback whatsoever >>> =20 > to > =20 >>> my attempts. This occurred over the course of several months about a >>> year ago. The issue still exists. I don't have time to look up the >>> exact defect I'm talking about, however, the symptom of the problem >>> =20 > I'm > =20 >>> experiencing boils down to the following test: >>> >>> [Test] >>> public void MockObjectsCanBeContainedInServiceContainer() >>> { >>> Mockery mockery =3D new Mockery(); >>> ServiceContainer container =3D new = ServiceContainer(); >>> IMockedType mockedType =3D mockery.NewMock(typeof >>> (IMockedType)) as IMockedType; >>> >>> container.AddService(typeof >>> =20 > (IMockedType),mockedType); > =20 >>> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); >>> } >>> >>> I have a patch that my company uses that fixes this issue and also >>> allows for the following functionality: >>> >>> [Test] >>> public void EventsCanBeRaisedDuringTests() >>> { >>> m_listenerMessage =3D null; >>> Mockery mocks =3D new Mockery(); >>> Announcer announcer =3D (Announcer) >>> mocks.NewMock(typeof(Announcer)); >>> >>> >>> =20 > Expect.Once.On(announcer).EventAdd("Listeners", > =20 >>> new Listener(DummyListener)); >>> >>> announcer.Listeners +=3D new >>> Listener(DummyListener); >>> >>> >>> =20 > Fire.Event("Listeners").On(announcer).With("Test > =20 >>> Message"); >>> >>> Assert.AreEqual("Test >>> Message",m_listenerMessage); >>> } >>> >>> >>> Finally, I have a patch to an issue raise several months ago >>> =20 > concerning > =20 >>> Verification of expectations when ordered expectations are used, also >>> =20 > a > =20 >>> major problem that remains unpatched to date as far as I can tell. >>> =20 >>> =20 >> =20 > ------------------------------------------------------------------------ > - > =20 >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> =20 >> =20 > > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > =20 ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NMock-two-dev mailing list NMo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-two-dev |
|
From: Steve M. <Ste...@ty...> - 2007-05-14 14:51:33
|
I don't necessarily need to become a committer, as long as someone will review the patches I send in. However, my company is using this product so I have a vested interest in adding features as my people need them. =20 I'm more than happy to just keep submitting patches though. -----Original Message----- From: nmo...@li... [mailto:nmo...@li...] On Behalf Of Steve Freeman Sent: Monday, May 14, 2007 9:48 AM To: NMock2 Development Discussion Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify If Steve wants to join as a committer, that would be fine. I'm not =20 sure we should create a committer for each patch, though, we already =20 have too many non-participants. S. On 4 May 2007, at 21:58, Nat Pryce wrote: > Could an admin add Steve as a committer? Then he could just apply his > patches straight in. ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NMock-two-dev mailing list NMo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-two-dev |
|
From: Steve F. <st...@m3...> - 2007-05-14 14:48:47
|
If Steve wants to join as a committer, that would be fine. I'm not sure we should create a committer for each patch, though, we already have too many non-participants. S. On 4 May 2007, at 21:58, Nat Pryce wrote: > Could an admin add Steve as a committer? Then he could just apply his > patches straight in. |
|
From: M. S. F. <va...@sc...> - 2007-05-14 14:47:57
|
Yeah. As I said in my blog, I think that this is a problem with the .Net framework, and not with NMock. Have you tried to see if you can reproduce the problem with Mono? Steve Mitcham wrote: > I copied your test case from your blog into the acceptance tests on my > version and the casting problem is still exhibited. > > -----Original Message----- > From: nmo...@li... > [mailto:nmo...@li...] On Behalf Of M. > Scott Ford > Sent: Monday, May 14, 2007 9:11 AM > To: NMock2 Development Discussion > Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify > > I wrote a few blog[1] posts[2] about this a long time ago. I am not sure > > if they are still relevant, but they may help. > > [1]: http://vaderpi.scottandlaurie.com/blog/?p=184 > [2]: http://vaderpi.scottandlaurie.com/blog/?p=188 > > Mike Capp wrote: > >> Hi Steve, >> >> I found your old mails on this subject while poking through the nmock >> list archives regarding a similar issue - an InvalidCastException on >> >> ArrayList list = new ArrayList(); >> list.Add(mockery.NewMock(typeof(IFoo))); >> IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo)); >> >> which I suspect has the same root cause as your IServiceContainer >> woes. Unfortunately, SourceForge's web archives don't include patches >> attached to mails (I only joined the project recently and so don't >> have the originals) and I didn't have your email until it popped up in >> this thread. Do you by any chance still have them handy? I'm not a >> project admin and so can't give you commit access, but I should be >> able to apply your fixes and check them in. >> >> cheers >> Mike >> >> >> On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: >> >> >>> I've submitted a patch to a major issue that I've come up against, >>> > that > >>> I believe covers an open error in the bug list, several times only to >>> have the patch submission be completely ignored. I gave up sending >>> information to the lists a long time ago due to this behavior. I can >>> understand a patch being rejected, but I got no feedback whatsoever >>> > to > >>> my attempts. This occurred over the course of several months about a >>> year ago. The issue still exists. I don't have time to look up the >>> exact defect I'm talking about, however, the symptom of the problem >>> > I'm > >>> experiencing boils down to the following test: >>> >>> [Test] >>> public void MockObjectsCanBeContainedInServiceContainer() >>> { >>> Mockery mockery = new Mockery(); >>> ServiceContainer container = new ServiceContainer(); >>> IMockedType mockedType = mockery.NewMock(typeof >>> (IMockedType)) as IMockedType; >>> >>> container.AddService(typeof >>> > (IMockedType),mockedType); > >>> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); >>> } >>> >>> I have a patch that my company uses that fixes this issue and also >>> allows for the following functionality: >>> >>> [Test] >>> public void EventsCanBeRaisedDuringTests() >>> { >>> m_listenerMessage = null; >>> Mockery mocks = new Mockery(); >>> Announcer announcer = (Announcer) >>> mocks.NewMock(typeof(Announcer)); >>> >>> >>> > Expect.Once.On(announcer).EventAdd("Listeners", > >>> new Listener(DummyListener)); >>> >>> announcer.Listeners += new >>> Listener(DummyListener); >>> >>> >>> > Fire.Event("Listeners").On(announcer).With("Test > >>> Message"); >>> >>> Assert.AreEqual("Test >>> Message",m_listenerMessage); >>> } >>> >>> >>> Finally, I have a patch to an issue raise several months ago >>> > concerning > >>> Verification of expectations when ordered expectations are used, also >>> > a > >>> major problem that remains unpatched to date as far as I can tell. >>> >>> >> > ------------------------------------------------------------------------ > - > >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> NMock-two-dev mailing list >> NMo...@li... >> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev >> >> > > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > |
|
From: Steve F. <st...@m3...> - 2007-05-14 14:47:06
|
Thanks, Mike. S. On 14 May 2007, at 15:02, Mike Capp wrote: > Hi Steve, > > I found your old mails on this subject while poking through the nmock > list archives regarding a similar issue - an InvalidCastException on > > ArrayList list = new ArrayList(); > list.Add(mockery.NewMock(typeof(IFoo))); > IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo)); > > which I suspect has the same root cause as your IServiceContainer > woes. Unfortunately, SourceForge's web archives don't include patches > attached to mails (I only joined the project recently and so don't > have the originals) and I didn't have your email until it popped up in > this thread. Do you by any chance still have them handy? I'm not a > project admin and so can't give you commit access, but I should be > able to apply your fixes and check them in. |
|
From: Steve M. <Ste...@ty...> - 2007-05-14 14:43:52
|
I copied your test case from your blog into the acceptance tests on my version and the casting problem is still exhibited. -----Original Message----- From: nmo...@li... [mailto:nmo...@li...] On Behalf Of M. Scott Ford Sent: Monday, May 14, 2007 9:11 AM To: NMock2 Development Discussion Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify I wrote a few blog[1] posts[2] about this a long time ago. I am not sure if they are still relevant, but they may help. [1]: http://vaderpi.scottandlaurie.com/blog/?p=3D184 [2]: http://vaderpi.scottandlaurie.com/blog/?p=3D188 Mike Capp wrote: > Hi Steve, > > I found your old mails on this subject while poking through the nmock > list archives regarding a similar issue - an InvalidCastException on > > ArrayList list =3D new ArrayList(); > list.Add(mockery.NewMock(typeof(IFoo))); > IFoo[] array =3D (IFoo[]) list.ToArray(typeof(IFoo)); > > which I suspect has the same root cause as your IServiceContainer > woes. Unfortunately, SourceForge's web archives don't include patches > attached to mails (I only joined the project recently and so don't > have the originals) and I didn't have your email until it popped up in > this thread. Do you by any chance still have them handy? I'm not a > project admin and so can't give you commit access, but I should be > able to apply your fixes and check them in. > > cheers > Mike > > > On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: > =20 >> I've submitted a patch to a major issue that I've come up against, that >> I believe covers an open error in the bug list, several times only to >> have the patch submission be completely ignored. I gave up sending >> information to the lists a long time ago due to this behavior. I can >> understand a patch being rejected, but I got no feedback whatsoever to >> my attempts. This occurred over the course of several months about a >> year ago. The issue still exists. I don't have time to look up the >> exact defect I'm talking about, however, the symptom of the problem I'm >> experiencing boils down to the following test: >> >> [Test] >> public void MockObjectsCanBeContainedInServiceContainer() >> { >> Mockery mockery =3D new Mockery(); >> ServiceContainer container =3D new = ServiceContainer(); >> IMockedType mockedType =3D mockery.NewMock(typeof >> (IMockedType)) as IMockedType; >> >> container.AddService(typeof (IMockedType),mockedType); >> >> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); >> } >> >> I have a patch that my company uses that fixes this issue and also >> allows for the following functionality: >> >> [Test] >> public void EventsCanBeRaisedDuringTests() >> { >> m_listenerMessage =3D null; >> Mockery mocks =3D new Mockery(); >> Announcer announcer =3D (Announcer) >> mocks.NewMock(typeof(Announcer)); >> >> Expect.Once.On(announcer).EventAdd("Listeners", >> new Listener(DummyListener)); >> >> announcer.Listeners +=3D new >> Listener(DummyListener); >> >> Fire.Event("Listeners").On(announcer).With("Test >> Message"); >> >> Assert.AreEqual("Test >> Message",m_listenerMessage); >> } >> >> >> Finally, I have a patch to an issue raise several months ago concerning >> Verification of expectations when ordered expectations are used, also a >> major problem that remains unpatched to date as far as I can tell. >> =20 > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > =20 ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NMock-two-dev mailing list NMo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-two-dev |
|
From: M. S. F. <va...@sc...> - 2007-05-14 14:11:33
|
I wrote a few blog[1] posts[2] about this a long time ago. I am not sure if they are still relevant, but they may help. [1]: http://vaderpi.scottandlaurie.com/blog/?p=184 [2]: http://vaderpi.scottandlaurie.com/blog/?p=188 Mike Capp wrote: > Hi Steve, > > I found your old mails on this subject while poking through the nmock > list archives regarding a similar issue - an InvalidCastException on > > ArrayList list = new ArrayList(); > list.Add(mockery.NewMock(typeof(IFoo))); > IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo)); > > which I suspect has the same root cause as your IServiceContainer > woes. Unfortunately, SourceForge's web archives don't include patches > attached to mails (I only joined the project recently and so don't > have the originals) and I didn't have your email until it popped up in > this thread. Do you by any chance still have them handy? I'm not a > project admin and so can't give you commit access, but I should be > able to apply your fixes and check them in. > > cheers > Mike > > > On 04/05/07, Steve Mitcham <Ste...@ty...> wrote: > >> I've submitted a patch to a major issue that I've come up against, that >> I believe covers an open error in the bug list, several times only to >> have the patch submission be completely ignored. I gave up sending >> information to the lists a long time ago due to this behavior. I can >> understand a patch being rejected, but I got no feedback whatsoever to >> my attempts. This occurred over the course of several months about a >> year ago. The issue still exists. I don't have time to look up the >> exact defect I'm talking about, however, the symptom of the problem I'm >> experiencing boils down to the following test: >> >> [Test] >> public void MockObjectsCanBeContainedInServiceContainer() >> { >> Mockery mockery = new Mockery(); >> ServiceContainer container = new ServiceContainer(); >> IMockedType mockedType = mockery.NewMock(typeof >> (IMockedType)) as IMockedType; >> >> container.AddService(typeof (IMockedType),mockedType); >> >> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType))); >> } >> >> I have a patch that my company uses that fixes this issue and also >> allows for the following functionality: >> >> [Test] >> public void EventsCanBeRaisedDuringTests() >> { >> m_listenerMessage = null; >> Mockery mocks = new Mockery(); >> Announcer announcer = (Announcer) >> mocks.NewMock(typeof(Announcer)); >> >> Expect.Once.On(announcer).EventAdd("Listeners", >> new Listener(DummyListener)); >> >> announcer.Listeners += new >> Listener(DummyListener); >> >> Fire.Event("Listeners").On(announcer).With("Test >> Message"); >> >> Assert.AreEqual("Test >> Message",m_listenerMessage); >> } >> >> >> Finally, I have a patch to an issue raise several months ago concerning >> Verification of expectations when ordered expectations are used, also a >> major problem that remains unpatched to date as far as I can tell. >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > NMock-two-dev mailing list > NMo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-two-dev > |
|
From: Steve M. <Ste...@ty...> - 2007-05-14 14:04:10
|
I'll get them as soon as I can. I'm in the middle of a delivery build
here at work. Should be sometime this week though.
-----Original Message-----
From: Mike Capp [mailto:mik...@gm...]=20
Sent: Monday, May 14, 2007 9:02 AM
To: Steve Mitcham
Cc: nmo...@li...
Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
Hi Steve,
I found your old mails on this subject while poking through the nmock
list archives regarding a similar issue - an InvalidCastException on
ArrayList list =3D new ArrayList();
list.Add(mockery.NewMock(typeof(IFoo)));
IFoo[] array =3D (IFoo[]) list.ToArray(typeof(IFoo));
which I suspect has the same root cause as your IServiceContainer
woes. Unfortunately, SourceForge's web archives don't include patches
attached to mails (I only joined the project recently and so don't
have the originals) and I didn't have your email until it popped up in
this thread. Do you by any chance still have them handy? I'm not a
project admin and so can't give you commit access, but I should be
able to apply your fixes and check them in.
cheers
Mike
On 04/05/07, Steve Mitcham <Ste...@ty...> wrote:
> I've submitted a patch to a major issue that I've come up against,
that
> I believe covers an open error in the bug list, several times only to
> have the patch submission be completely ignored. I gave up sending
> information to the lists a long time ago due to this behavior. I can
> understand a patch being rejected, but I got no feedback whatsoever to
> my attempts. This occurred over the course of several months about a
> year ago. The issue still exists. I don't have time to look up the
> exact defect I'm talking about, however, the symptom of the problem
I'm
> experiencing boils down to the following test:
>
> [Test]
> public void MockObjectsCanBeContainedInServiceContainer()
> {
> Mockery mockery =3D new Mockery();
> ServiceContainer container =3D new ServiceContainer();
> IMockedType mockedType =3D mockery.NewMock(typeof
> (IMockedType)) as IMockedType;
>
> container.AddService(typeof (IMockedType),mockedType);
>
> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType)));
> }
>
> I have a patch that my company uses that fixes this issue and also
> allows for the following functionality:
>
> [Test]
> public void EventsCanBeRaisedDuringTests()
> {
> m_listenerMessage =3D null;
> Mockery mocks =3D new Mockery();
> Announcer announcer =3D (Announcer)
> mocks.NewMock(typeof(Announcer));
>
>
Expect.Once.On(announcer).EventAdd("Listeners",
> new Listener(DummyListener));
>
> announcer.Listeners +=3D new
> Listener(DummyListener);
>
>
Fire.Event("Listeners").On(announcer).With("Test
> Message");
>
> Assert.AreEqual("Test
> Message",m_listenerMessage);
> }
>
>
> Finally, I have a patch to an issue raise several months ago
concerning
> Verification of expectations when ordered expectations are used, also
a
> major problem that remains unpatched to date as far as I can tell.
|
|
From: Mike C. <mik...@gm...> - 2007-05-14 14:02:06
|
Hi Steve,
I found your old mails on this subject while poking through the nmock
list archives regarding a similar issue - an InvalidCastException on
ArrayList list = new ArrayList();
list.Add(mockery.NewMock(typeof(IFoo)));
IFoo[] array = (IFoo[]) list.ToArray(typeof(IFoo));
which I suspect has the same root cause as your IServiceContainer
woes. Unfortunately, SourceForge's web archives don't include patches
attached to mails (I only joined the project recently and so don't
have the originals) and I didn't have your email until it popped up in
this thread. Do you by any chance still have them handy? I'm not a
project admin and so can't give you commit access, but I should be
able to apply your fixes and check them in.
cheers
Mike
On 04/05/07, Steve Mitcham <Ste...@ty...> wrote:
> I've submitted a patch to a major issue that I've come up against, that
> I believe covers an open error in the bug list, several times only to
> have the patch submission be completely ignored. I gave up sending
> information to the lists a long time ago due to this behavior. I can
> understand a patch being rejected, but I got no feedback whatsoever to
> my attempts. This occurred over the course of several months about a
> year ago. The issue still exists. I don't have time to look up the
> exact defect I'm talking about, however, the symptom of the problem I'm
> experiencing boils down to the following test:
>
> [Test]
> public void MockObjectsCanBeContainedInServiceContainer()
> {
> Mockery mockery = new Mockery();
> ServiceContainer container = new ServiceContainer();
> IMockedType mockedType = mockery.NewMock(typeof
> (IMockedType)) as IMockedType;
>
> container.AddService(typeof (IMockedType),mockedType);
>
> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType)));
> }
>
> I have a patch that my company uses that fixes this issue and also
> allows for the following functionality:
>
> [Test]
> public void EventsCanBeRaisedDuringTests()
> {
> m_listenerMessage = null;
> Mockery mocks = new Mockery();
> Announcer announcer = (Announcer)
> mocks.NewMock(typeof(Announcer));
>
> Expect.Once.On(announcer).EventAdd("Listeners",
> new Listener(DummyListener));
>
> announcer.Listeners += new
> Listener(DummyListener);
>
> Fire.Event("Listeners").On(announcer).With("Test
> Message");
>
> Assert.AreEqual("Test
> Message",m_listenerMessage);
> }
>
>
> Finally, I have a patch to an issue raise several months ago concerning
> Verification of expectations when ordered expectations are used, also a
> major problem that remains unpatched to date as far as I can tell.
|
|
From: Drew N. <dre...@ya...> - 2007-05-04 23:39:30
|
I think a lot of people would be interested in seeing Steve's event firing code be part of NMock. I certainly would. If you're looking for another tester Steve... :)
----- Original Message ----
From: Nat Pryce <nat...@gm...>
To: NMock2 Development Discussion <nmo...@li...>
Sent: Friday, 4 May, 2007 9:58:05 PM
Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
Could an admin add Steve as a committer? Then he could just apply his
patches straight in.
--Nat
On 04/05/07, Steve Mitcham <Ste...@ty...> wrote:
> I've submitted a patch to a major issue that I've come up against, that
> I believe covers an open error in the bug list, several times only to
> have the patch submission be completely ignored. I gave up sending
> information to the lists a long time ago due to this behavior. I can
> understand a patch being rejected, but I got no feedback whatsoever to
> my attempts. This occurred over the course of several months about a
> year ago. The issue still exists. I don't have time to look up the
> exact defect I'm talking about, however, the symptom of the problem I'm
> experiencing boils down to the following test:
>
> [Test]
> public void MockObjectsCanBeContainedInServiceContainer()
> {
> Mockery mockery = new Mockery();
> ServiceContainer container = new ServiceContainer();
> IMockedType mockedType = mockery.NewMock(typeof
> (IMockedType)) as IMockedType;
>
> container.AddService(typeof (IMockedType),mockedType);
>
> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType)));
> }
>
> I have a patch that my company uses that fixes this issue and also
> allows for the following functionality:
>
> [Test]
> public void EventsCanBeRaisedDuringTests()
> {
> m_listenerMessage = null;
> Mockery mocks = new Mockery();
> Announcer announcer = (Announcer)
> mocks.NewMock(typeof(Announcer));
>
> Expect.Once.On(announcer).EventAdd("Listeners",
> new Listener(DummyListener));
>
> announcer.Listeners += new
> Listener(DummyListener);
>
> Fire.Event("Listeners").On(announcer).With("Test
> Message");
>
> Assert.AreEqual("Test
> Message",m_listenerMessage);
> }
>
>
> Finally, I have a patch to an issue raise several months ago concerning
> Verification of expectations when ordered expectations are used, also a
> major problem that remains unpatched to date as far as I can tell.
>
> -----Original Message-----
> From: nmo...@li...
> [mailto:nmo...@li...] On Behalf Of M.
> Scott Ford
> Sent: Friday, May 04, 2007 3:41 PM
> To: NMock2 Development Discussion
> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
>
> Just because a project does not have much activity does not mean that
> the project is dead, it often means that the project is stable. I am
> still actively using NMock on several different projects, and I have yet
> to come across any serious issue since the RC was posted perhaps it is
> time to bump it up to 1.0.
>
> -----Original Message-----
> From: "Steve Freeman" <st...@m3...>
> To: "NMock2 Development Discussion"
> <nmo...@li...>
> Sent: 5/3/07 6:16 PM
> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
>
> Sorry Mike, but I put my time in on that project and handed it off in
> the hope it would get looked after. I don't have a .Net environment
> at the moment so it's hard for me to do serious work. I added the
> last committer because he needed updates to keep NMock in his project.
>
> The issue is not that NMock uses strings (although c.f. the work that
> Nat has been doing in jMock), the issue is whether the project is
> still live and responsive. From the traffic I've seen, many people in
> the .Net world assume that it's dead.
>
> S.
>
> On 3 May 2007, at 22:43, Mike Mason wrote:
>
> > On 5/3/07, Steve Freeman <smg...@gm...> wrote:
> >>
> >> This is part of a string of similar messages on the TDD list.
> >>
> >> Looks like NMock is dead in the water. Any of the committers still
> >> there?
> >>
> >
> > There are 18 committers on the SourceForge project, including
> > yourself. I
> > believe at least two of those have been recently added in response
> > to a call
> > for people who have time they can devote to applying NMock patches,
> > etc.
> >
> > The discussion over on the TDD group is fair -- NMock doesn't use
> > record/playback like Rhino does, and so gets caught out when you
> > refactor
> > method names or add/remove parameters. This isn't going to change,
> > and if
> > people really want refactoring support that's better than
> > ReSharper's "also
> > look in strings" option, they should pick Rhino.
> >
> > I do agree that NMock's error messages and general friendliness
> > could be
> > improved, and it'd be great to see people such as yourself committing
> > changes to help out.
> >
> > Cheers,
> > Mike.
>
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NMock-two-dev mailing list
NMo...@li...
https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html |
|
From: Nat P. <nat...@gm...> - 2007-05-04 20:58:05
|
Could an admin add Steve as a committer? Then he could just apply his
patches straight in.
--Nat
On 04/05/07, Steve Mitcham <Ste...@ty...> wrote:
> I've submitted a patch to a major issue that I've come up against, that
> I believe covers an open error in the bug list, several times only to
> have the patch submission be completely ignored. I gave up sending
> information to the lists a long time ago due to this behavior. I can
> understand a patch being rejected, but I got no feedback whatsoever to
> my attempts. This occurred over the course of several months about a
> year ago. The issue still exists. I don't have time to look up the
> exact defect I'm talking about, however, the symptom of the problem I'm
> experiencing boils down to the following test:
>
> [Test]
> public void MockObjectsCanBeContainedInServiceContainer()
> {
> Mockery mockery = new Mockery();
> ServiceContainer container = new ServiceContainer();
> IMockedType mockedType = mockery.NewMock(typeof
> (IMockedType)) as IMockedType;
>
> container.AddService(typeof (IMockedType),mockedType);
>
> Assert.AreSame(mockedType,container.GetService(typeof(IMockedType)));
> }
>
> I have a patch that my company uses that fixes this issue and also
> allows for the following functionality:
>
> [Test]
> public void EventsCanBeRaisedDuringTests()
> {
> m_listenerMessage = null;
> Mockery mocks = new Mockery();
> Announcer announcer = (Announcer)
> mocks.NewMock(typeof(Announcer));
>
> Expect.Once.On(announcer).EventAdd("Listeners",
> new Listener(DummyListener));
>
> announcer.Listeners += new
> Listener(DummyListener);
>
> Fire.Event("Listeners").On(announcer).With("Test
> Message");
>
> Assert.AreEqual("Test
> Message",m_listenerMessage);
> }
>
>
> Finally, I have a patch to an issue raise several months ago concerning
> Verification of expectations when ordered expectations are used, also a
> major problem that remains unpatched to date as far as I can tell.
>
> -----Original Message-----
> From: nmo...@li...
> [mailto:nmo...@li...] On Behalf Of M.
> Scott Ford
> Sent: Friday, May 04, 2007 3:41 PM
> To: NMock2 Development Discussion
> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
>
> Just because a project does not have much activity does not mean that
> the project is dead, it often means that the project is stable. I am
> still actively using NMock on several different projects, and I have yet
> to come across any serious issue since the RC was posted perhaps it is
> time to bump it up to 1.0.
>
> -----Original Message-----
> From: "Steve Freeman" <st...@m3...>
> To: "NMock2 Development Discussion"
> <nmo...@li...>
> Sent: 5/3/07 6:16 PM
> Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
>
> Sorry Mike, but I put my time in on that project and handed it off in
> the hope it would get looked after. I don't have a .Net environment
> at the moment so it's hard for me to do serious work. I added the
> last committer because he needed updates to keep NMock in his project.
>
> The issue is not that NMock uses strings (although c.f. the work that
> Nat has been doing in jMock), the issue is whether the project is
> still live and responsive. From the traffic I've seen, many people in
> the .Net world assume that it's dead.
>
> S.
>
> On 3 May 2007, at 22:43, Mike Mason wrote:
>
> > On 5/3/07, Steve Freeman <smg...@gm...> wrote:
> >>
> >> This is part of a string of similar messages on the TDD list.
> >>
> >> Looks like NMock is dead in the water. Any of the committers still
> >> there?
> >>
> >
> > There are 18 committers on the SourceForge project, including
> > yourself. I
> > believe at least two of those have been recently added in response
> > to a call
> > for people who have time they can devote to applying NMock patches,
> > etc.
> >
> > The discussion over on the TDD group is fair -- NMock doesn't use
> > record/playback like Rhino does, and so gets caught out when you
> > refactor
> > method names or add/remove parameters. This isn't going to change,
> > and if
> > people really want refactoring support that's better than
> > ReSharper's "also
> > look in strings" option, they should pick Rhino.
> >
> > I do agree that NMock's error messages and general friendliness
> > could be
> > improved, and it'd be great to see people such as yourself committing
> > changes to help out.
> >
> > Cheers,
> > Mike.
>
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
>
|
|
From: Steve M. <Ste...@ty...> - 2007-05-04 20:51:04
|
I've submitted a patch to a major issue that I've come up against, that
I believe covers an open error in the bug list, several times only to
have the patch submission be completely ignored. I gave up sending
information to the lists a long time ago due to this behavior. I can
understand a patch being rejected, but I got no feedback whatsoever to
my attempts. This occurred over the course of several months about a
year ago. The issue still exists. I don't have time to look up the
exact defect I'm talking about, however, the symptom of the problem I'm
experiencing boils down to the following test:
[Test]
public void MockObjectsCanBeContainedInServiceContainer()
{
Mockery mockery =3D new Mockery();
ServiceContainer container =3D new ServiceContainer();
IMockedType mockedType =3D mockery.NewMock(typeof
(IMockedType)) as IMockedType;
=09
container.AddService(typeof (IMockedType),mockedType);
=20
Assert.AreSame(mockedType,container.GetService(typeof(IMockedType)));
}
I have a patch that my company uses that fixes this issue and also
allows for the following functionality:
[Test]
public void EventsCanBeRaisedDuringTests()
{
m_listenerMessage =3D null;
Mockery mocks =3D new Mockery();
Announcer announcer =3D (Announcer)
mocks.NewMock(typeof(Announcer));
=09
Expect.Once.On(announcer).EventAdd("Listeners",
new Listener(DummyListener));
=09
announcer.Listeners +=3D new
Listener(DummyListener);
=09
Fire.Event("Listeners").On(announcer).With("Test
Message");
=09
Assert.AreEqual("Test
Message",m_listenerMessage);
}
Finally, I have a patch to an issue raise several months ago concerning
Verification of expectations when ordered expectations are used, also a
major problem that remains unpatched to date as far as I can tell.
-----Original Message-----
From: nmo...@li...
[mailto:nmo...@li...] On Behalf Of M.
Scott Ford
Sent: Friday, May 04, 2007 3:41 PM
To: NMock2 Development Discussion
Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
Just because a project does not have much activity does not mean that
the project is dead, it often means that the project is stable. I am
still actively using NMock on several different projects, and I have yet
to come across any serious issue since the RC was posted perhaps it is
time to bump it up to 1.0.=20
-----Original Message-----
From: "Steve Freeman" <st...@m3...>
To: "NMock2 Development Discussion"
<nmo...@li...>
Sent: 5/3/07 6:16 PM
Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify
Sorry Mike, but I put my time in on that project and handed it off in =20
the hope it would get looked after. I don't have a .Net environment =20
at the moment so it's hard for me to do serious work. I added the =20
last committer because he needed updates to keep NMock in his project.
The issue is not that NMock uses strings (although c.f. the work that =20
Nat has been doing in jMock), the issue is whether the project is =20
still live and responsive. From the traffic I've seen, many people in =20
the .Net world assume that it's dead.
S.
On 3 May 2007, at 22:43, Mike Mason wrote:
> On 5/3/07, Steve Freeman <smg...@gm...> wrote:
>>
>> This is part of a string of similar messages on the TDD list.
>>
>> Looks like NMock is dead in the water. Any of the committers still
>> there?
>>
>
> There are 18 committers on the SourceForge project, including =20
> yourself. I
> believe at least two of those have been recently added in response =20
> to a call
> for people who have time they can devote to applying NMock patches, =20
> etc.
>
> The discussion over on the TDD group is fair -- NMock doesn't use
> record/playback like Rhino does, and so gets caught out when you =20
> refactor
> method names or add/remove parameters. This isn't going to change, =20
> and if
> people really want refactoring support that's better than =20
> ReSharper's "also
> look in strings" option, they should pick Rhino.
>
> I do agree that NMock's error messages and general friendliness =20
> could be
> improved, and it'd be great to see people such as yourself committing
> changes to help out.
>
> Cheers,
> Mike.
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NMock-two-dev mailing list
NMo...@li...
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NMock-two-dev mailing list
NMo...@li...
https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
|
|
From: M. S. F. <va...@sc...> - 2007-05-04 20:41:04
|
Just because a project does not have much activity does not mean that the p= roject is dead, it often means that the project is stable. I am still activ= ely using NMock on several different projects, and I have yet to come acros= s any serious issue since the RC was posted perhaps it is time to bump it u= p to 1.0.=20 -----Original Message----- From: "Steve Freeman" <st...@m3...> To: "NMock2 Development Discussion" <nmo...@li...> Sent: 5/3/07 6:16 PM Subject: Re: [NMock2-Dev] Fwd: [TDD] Nmock verify Sorry Mike, but I put my time in on that project and handed it off in =20 the hope it would get looked after. I don't have a .Net environment =20 at the moment so it's hard for me to do serious work. I added the =20 last committer because he needed updates to keep NMock in his project. The issue is not that NMock uses strings (although c.f. the work that =20 Nat has been doing in jMock), the issue is whether the project is =20 still live and responsive. From the traffic I've seen, many people in =20 the .Net world assume that it's dead. S. On 3 May 2007, at 22:43, Mike Mason wrote: > On 5/3/07, Steve Freeman <smg...@gm...> wrote: >> >> This is part of a string of similar messages on the TDD list. >> >> Looks like NMock is dead in the water. Any of the committers still >> there? >> > > There are 18 committers on the SourceForge project, including =20 > yourself. I > believe at least two of those have been recently added in response =20 > to a call > for people who have time they can devote to applying NMock patches, =20 > etc. > > The discussion over on the TDD group is fair -- NMock doesn't use > record/playback like Rhino does, and so gets caught out when you =20 > refactor > method names or add/remove parameters. This isn't going to change, =20 > and if > people really want refactoring support that's better than =20 > ReSharper's "also > look in strings" option, they should pick Rhino. > > I do agree that NMock's error messages and general friendliness =20 > could be > improved, and it'd be great to see people such as yourself committing > changes to help out. > > Cheers, > Mike. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NMock-two-dev mailing list NMo...@li...= |
|
From: Steve F. <st...@m3...> - 2007-05-03 22:17:16
|
Sorry Mike, but I put my time in on that project and handed it off in the hope it would get looked after. I don't have a .Net environment at the moment so it's hard for me to do serious work. I added the last committer because he needed updates to keep NMock in his project. The issue is not that NMock uses strings (although c.f. the work that Nat has been doing in jMock), the issue is whether the project is still live and responsive. From the traffic I've seen, many people in the .Net world assume that it's dead. S. On 3 May 2007, at 22:43, Mike Mason wrote: > On 5/3/07, Steve Freeman <smg...@gm...> wrote: >> >> This is part of a string of similar messages on the TDD list. >> >> Looks like NMock is dead in the water. Any of the committers still >> there? >> > > There are 18 committers on the SourceForge project, including > yourself. I > believe at least two of those have been recently added in response > to a call > for people who have time they can devote to applying NMock patches, > etc. > > The discussion over on the TDD group is fair -- NMock doesn't use > record/playback like Rhino does, and so gets caught out when you > refactor > method names or add/remove parameters. This isn't going to change, > and if > people really want refactoring support that's better than > ReSharper's "also > look in strings" option, they should pick Rhino. > > I do agree that NMock's error messages and general friendliness > could be > improved, and it'd be great to see people such as yourself committing > changes to help out. > > Cheers, > Mike. |
|
From: Mike M. <mg...@es...> - 2007-05-03 21:43:05
|
On 5/3/07, Steve Freeman <smg...@gm...> wrote: > > This is part of a string of similar messages on the TDD list. > > Looks like NMock is dead in the water. Any of the committers still > there? > There are 18 committers on the SourceForge project, including yourself. I believe at least two of those have been recently added in response to a call for people who have time they can devote to applying NMock patches, etc. The discussion over on the TDD group is fair -- NMock doesn't use record/playback like Rhino does, and so gets caught out when you refactor method names or add/remove parameters. This isn't going to change, and if people really want refactoring support that's better than ReSharper's "also look in strings" option, they should pick Rhino. I do agree that NMock's error messages and general friendliness could be improved, and it'd be great to see people such as yourself committing changes to help out. Cheers, Mike. |
|
From: Steve F. <smg...@gm...> - 2007-05-03 20:54:40
|
This is part of a string of similar messages on the TDD list. Looks like NMock is dead in the water. Any of the committers still there? S. Begin forwarded message: > From: "matthornsby2004" <mat...@gm...> > Date: 2 May 2007 16:25:17 BDT > To: tes...@ya... > Subject: Re: [TDD] Nmock verify > Reply-To: tes...@ya... > > John, > > I think you'll find that the syntax is very similar for the most part. > Plus, there is pretty good documentation on the Rhino.Mocks website > and > Ayende is great about quickly responding to questions on the > Rhino.Mocks google group. > > Matt > >> Corey, >> >> you are right - I ought to - it's just that it's <grumble> yet >> another >> thing >> to learn </grumble>. Does RhinoMock *not* support something else? Or > is >> the syntax weirdly different etc. I know, I know "go and try it"... >> >> John D. >> |
|
From: Reinaldo C. S. <rei...@ya...> - 2007-02-26 18:20:07
|
--------------------------------
- GAC - Global Assembly Cache -
--------------------------------
To add Mock2 DLL to GAC, you need follow these steps:
1 - Add Mock2.dll to Global Assembly Cache
a. Open "Control Panel";
b. Open "Administrative Tools";
c. Open "Microsoft .NET Framework 2.0 Configuration";
d. Rigth-Click in "Assembly Cache" item;
e. Click in "ADD" option;
f. Find "NMock2.dll" and click "Open".
2 - Add Registry Reference to DLL folder in GAC
a. Add follow reference to Windows Registry (using regedit.exe):
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies"
b. If all users use this application, replace [HKEY_CURRENT_USER] to [HKEY_LOCAL_MACHINE];
EXAMPLE OF Registry.reg:
-----------------------------------------------------------------------------------------------------
- Windows Registry Editor Version 5.00 -
- -
- [HKEY_CURRENT_USER\Software\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\NMock2] -
- @="C:\\Program Files\\nmock2\\bin" -
-----------------------------------------------------------------------------------------------------
References:
-----------
Add Registry Reference:
http://support.microsoft.com/default.aspx?scid=kb;en-us;306149
Generate Global Assembly Cache to program:
http://pointerx.net/blogs/glozano/archive/2006/03/24/97.aspx
|
|
From: Richard H. <Ric...@qu...> - 2006-11-29 20:47:35
|
After trying to debug the problems I was having with Ordered expectations I believe that Ordered and Unordered should be function calls and not properties. The only changes to the current tests that would be required are the parenthesis on each use of Ordered and Unordered. Changing them to function calls would allow for easier debugging of ordered test cases. Currently any time you expand the mock object in the debugger data window the Ordered and Unordered properties have get called on them so any inspection changes the state of the machine. -Richard Holden |
|
From: Richard H. <Ric...@qu...> - 2006-11-29 20:21:23
|
I just submitted a bug on ordering expectations. Using multiple expectations in ordering I found that the Ordered expectation is considered met if you only satisfy the first expectation. I am attaching a patch with a test, documentation and bug fix. The patch was created from the root of the nmock2 CVS tree. -Richard Holden |
|
From: Owen R. <exo...@gm...> - 2006-11-20 19:02:25
|
On 16/11/06, Nat Pryce <nat...@gm...> wrote: > You'll need a login to CCNet Live, the cruise server, from whoever > administers that. However, it doesn't appear that CCNet Live is > building it, so it might be easier to set up your own build server. i administer it. the ccnetlive project is for the original nmock. if it would be useful, i could set up a project for nmock2. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com |
|
From: Mike M. <mg...@es...> - 2006-11-17 18:52:36
|
On 11/16/06, Nat Pryce <nat...@gm...> wrote: > > On the subject of nmock.org, currently www.nmock.org doesn't point > anywhere but nmock.org does. It's pretty confusing. Who owns the > domain? > Joe Walnes owns the domain and previously hosted the website on his servers. I think Joe lurks on this list -- Joe? |