/*
Copyright (C) 2006 Mark Garner
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
using System;
using System.Collections.Generic;
using System.Text;
using CommandLine;
namespace NDataUnit
{
class Program
{
private static string _targetServerName;
private static string _targetDatabaseName;
private static string _testScriptPath;
private static string _outputLogFilePath;
static int Main(string[] args)
{
NDataUnitArguments parsedArgs = new NDataUnitArguments();
if (Parser.ParseArgumentsWithUsage(args, parsedArgs))
{
_targetServerName = parsedArgs.targetServerName;
_targetDatabaseName = parsedArgs.targetDatabaseName;
_testScriptPath = parsedArgs.testScriptPath;
_outputLogFilePath = parsedArgs.outputLogFilePath;
}
else
{
return -1;
}
TestSuite testSuite = new TestSuite(_testScriptPath, _outputLogFilePath, _targetServerName, _targetDatabaseName);
int failureCount = 0;
failureCount = testSuite.Run();
return failureCount;
}
}
}