|
From: Joe W. <jo...@tr...> - 2002-12-16 17:57:39
|
Steve: >>> Why not? It seems a bit odd to write another >>> assertion class Joe: >>Two reasons: >> >> 1) I haven't quite figured out how assembly linking works in .NET yet. >> If NMock is compiled for version x of NUnit and then the user attempts >> to use it with version y, it fails miserably. I'm sure there's a nice >> solution though... >> >> 2) There are lots of other unit-testing frameworks for .NET (NUnit 1, >> NUnit 2 which is totally different, X-Unity, #Unit, blah blah). Didn't >> want to tie the user into a particular tool. Steve: > Interesting, the monolithic MS world is far more splintered than for > other languages. Unfortunately NUnit 1.0 was a bit of a balls up (it was a direct port line for line of JUnit which didn't make the most of .NET). So lots of other people started writing alternatives that were better. Then NUnit 2.0 came out (recently) which kind of won, but there are still lots of people use other tools. > I think it may be worth thinking this one through a bit, because it > just feels wrong to start yet another assertion library. Agree. Any ideas? I was thinking about making an abstraction over the other apis, but compared with writing a very simple class it just didnt make sense. > Also, > - I'm not sure that the default behaviour for a null argument should be to match > anything. That makes it a right pain to test for equality with nulls. We can > have another marker for ignore all arguments. Well, there is the IsNull contstraint. I found I used IsAnything alot more than IsNull so I made it a default. However it's obviously confusing. Would like to get more people's opinions on this... > - we might want to add a return value on the mock call. I think we did this > in the Java version with a default value to fall back to. Yup. It's on the todo list: http://jira.truemesh.com/secure/ViewIssue.jspa?key=NMO-2 >I'll see if I can get checkin the new stuff. Too late!!! :) -Joe PS. See the roadmap: http://jira.truemesh.com/secure/BrowseProject.jspa?id=10001&report=roadmap |