Reputation: 527
I am trying to write some complicated acceptance tests for my C# code. I notice that when I am writing my tests I am doing a lot of explicit casting to satisfy the C# compiler. I like the type-safety I get in my production code with a statically-typed language like C#, but for my tests I would be happy to use a dynamically-typed language (e.g. IronPython or IronRuby) to avoid all the explicit casting. If my test calls a method that doesn't exist on an object, it would be OK for the code to fail at run time (it's just a failing test). I am currently using MS Test as my unit testing framework, and it would be convenient if I could continue to use it. What dynamic (DLR-based) language can I use that will integrate with MS Test? Feel free to suggest a different testing framework, if you think that would help.
Upvotes: 4
Views: 507
Reputation: 881705
I recommend IronPython -- among its advantages is the excellent book "IronPython in Action" which will lead you through every important aspect, including testing.
Upvotes: 2
Reputation: 6437
For IronRuby and Rspec you could check out this post:
http://msdn.microsoft.com/en-us/magazine/dd453038.aspx
And http://msdn.microsoft.com/sv-se/magazine/dd434651(en-us).aspx for getting started with IronRuby .Net interop.
Then there is always fitnesse:
Fitnesse .net 1.1 and 2.0 binaries can be found here: http://fitnesse.org/FitNesse.DotNet
Upvotes: 2
Reputation: 26455
I prefer C# for unit testing... If you are looking for dynamic language you can try iron-python for that....
Upvotes: 2