views:

140

answers:

2

I've recently stumbled upon T#. It seems a nice concept but I'm wondering if it's worth switching from nUnit to this? I love the pros but hate the cons so I'm still undecided

Pros:

  • specialized language for unit testing (keywords)
  • relative assertions
  • compile time warnings
  • focus on test intentions

Cons:

  • lack of (integrated) tool support
  • it's still beta?
  • not used by many

(Don't forget to update the list)

A: 

I know that this might not be a strong argument, but looking at some of that example code, it just gave me the shivers. Looks like they're mainly introducing new keywords as syntactic sugar to replace common syntax like Assert(x, y) or even whole methods. I don't know. It just looks... wrong.

Razzie
I on the other hand like that as it makes test clearer. It might be troublesome as future versions of C# might introduce some keyword conflicts. Perhaps this should move into undecided column.
Goran
yes, I figured while typing that there will definately be people out there who do like it. Alas, it is really a personal preference I guess, that's why I stated that it is not a strong argument. But I really felt inclined to say it anyway :-)
Razzie
A: 

In my experience the most important factor for successful unit testing is the ease of use - you should be able to write and run tests easily from within visual studio otherwise it becomes a big hassle and would be dropped by the first deadline missed.
This in one of the reasons I only use a unit testing frameowrk that has a good integration in VS - either built it (MSTest) or with the aid of 3rd party tools (NUnit, XUnit etc.)

T# looks very promising but unit it has VS integration I wouldn't touch it.

Dror Helper