Home
»
T# Compiler
»
Syntax for test methods testing a constructor
Conversations on T# compiler features, usability, wish list...
20/05/2010 9:53:35 AM
 Arsène von Wyss Posts: 8
|
When I declare a test, I can specify which method or property it tests. However, I have not been able to find a valid syntax to define that the constructor is to be tested, and the documentation doesn't seem to mention this either. So what's the best practice for testing those?
|
|
0
• permalink
|
20/05/2010 12:40:32 PM
 Ludovic Dubois Administrator Posts: 155
|
You should use the name of the class, just like in C#.
testclass for Product { test Product( string name, double price ) { runtest Product p = new Product( "My Product", 123 ); assert ...; } }
|
|
0
• permalink
|