home recent topics recent posts search faq  

Pretty Objects Visual T# Forum

Addicted toThe Most Intelligent Add-In To Visual Studio Addicted toAddicted to


register | lost password   open id sign in with Twitter
Messages in this topic - RSS

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
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
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

Home » T# Compiler » Syntax for test methods testing a constructor





Powered by Jitbit Forum 7.2.7.0 © 2006-2011 Jitbit Software