Code: Select all
public static int Main(string[] args)
{
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
int error = 0;
try
{
ActivityStack.Instance.EndActivity += new EventHandler(ActivityStack_Instance_EndActivity);
error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
}
catch (Exception e)
{
Report.Error("Unexpected exception occurred: " + e.ToString());
error = -1;
}
return error;
}
static void ActivityStack_Instance_EndActivity(object sender, EventArgs e)
{
if (TestSuite.Current.Parameters["IsTestSuiteMappable"] == "True")
{
if (TestSuite.CurrentTestContainer.IsTestCase)
{
if (IsFirstTestCase)
{
// My logic here
}
else
{
// My logic here
}
}
}
}