|
From: Charlie P. <ch...@po...> - 2007-11-10 17:15:33
|
Hi All, Replying to my own post: I see now that Steve is not concerned with the test framework users are using, but with the one that is used to test NMock2. However, it does look as if NMock2 also has a reference to NUnit, so I changed the subject. For a long time I had planned to use NMock2 for NUnit's tests. Since we ship the tests, that would mean shipping the NMock2 dll as well. When I set about to do it earlier this year, I ran into a hitch. The problem is that NMock2 had a reference to NUnit. As a result, it would not load in my (newer) NUnit build. >From Nat's description of what JMock 2 does, I'm guessin that the exceptions are translated based on name strings rather than types. That's what NUnit does for its own exceptions and for "foreign" exceptions like csUnit's or Microsoft's. So, in the case of NUnit, you could throw an exception of your own, so long as it's name was NUnit.Framework.AssertionException. Alternatively, you could throw your own exception and let the test frameworks deal with it. For most frameworks - definitely for NUnit - your unknown exception would show up as an error. We could easily modify NUnit to convert it to a failure, based on the name of your exception, but there isn't currently much difference between how we handle errors and failures anyway. Charlie _____ From: nmo...@li... [mailto:nmo...@li...] On Behalf Of Charlie Poole Sent: Friday, November 09, 2007 6:29 AM To: 'NMock2 Development Discussion' Subject: Re: [NMock2-Dev] NUnit vs. MbUnit Hi Steve, I'm quite surprised that there is a dependecy at all - you'd think I'd know, but I didn't. Is this purely on the basis of how failures are reported, or is it deeper than that? Charlie _____ From: nmo...@li... [mailto:nmo...@li...] On Behalf Of Steve Mitcham Sent: Thursday, November 08, 2007 12:16 PM To: NMock2 Development Discussion Subject: [NMock2-Dev] NUnit vs. MbUnit I'm in the good position of having gotten my company to adopt NMock2 into the development process, and to get the permission needed to work on the OSS side and re-post our changes to the community. I've been harping on the need to 'play nice' with the communities providing us all of our test harness stuff recently. Anyway, currently there is a desire to convert our internal copy of NMock2 to use MbUnit as the testing framework instead of NUnit. They have to certify the functionality of all the development tools and they already have what they need for MbUnit so they want to use it for the test suite. I'm maintaining parallel trees to map the internal version and the external versions together. We have some versioning requirements that I don't want to leverage on the main development branch of NMock so I keep it separate. While I am of the mind of 'if it isn't broken, don't fix it', I have to do the work anyway, so. Would anyone be interested in the move to MbUnit or should I just keep it internal. Again, I'm not suggesting it, just trying to get a feel for whether anyone wants it. |