#include "stdafx.h"
#include "Model.h"


void usage();

// first command line argument is the name of a class
int _tmain(int argc, char **argv)
{
	if( argc != 2)
	{
		usage();
		exit(-1);
	}
	String __gc* outputString = NULL;
	StringBuilder __gc* argc0 = new StringBuilder(argv[1]);
	String __gc* inputString = argc0->ToString();
	if( inputString->CompareTo("CurrentYearGrowth") == 0 )
	{
		CurrentYearGrowth __gc* obj = new CurrentYearGrowth();
		outputString = obj->unitTest();
	}
	else if( inputString->CompareTo("FieldTrip") == 0 )
	{
		FieldTrip __gc* obj = new FieldTrip();
		outputString = obj->unitTest();
	}
	else if( inputString->CompareTo("PlantPatch") == 0 )
	{
		PlantPatch __gc* obj = new PlantPatch();
		outputString = obj->unitTest();
	}
	else if( inputString->CompareTo("Waypoint") == 0 )
	{
		Waypoint __gc* obj = new Waypoint();
		outputString = obj->unitTest();
	}
	else
	{
		usage();
		exit(-1);
	}

	if( outputString != NULL ){
		System::Console::WriteLine(outputString);
	}
	return 0;
}

void usage()
{
		System::Console::WriteLine("");
		System::Console::WriteLine("Usage: UnitTester <class>");
		System::Console::WriteLine("");
		System::Console::WriteLine("<class> is one of:");
		System::Console::WriteLine("	CurrentYearGrowth");
		System::Console::WriteLine("	FieldTrip");
		System::Console::WriteLine("	PlantPatch");
		System::Console::WriteLine("	Waypoint");
}