Esempio n. 1
0
 public static void PrintTestFixtureSetup()
 {
     try
     {
         TestContext context = TestContext.CurrentContext;
         if (isLogAllowed && tempLog.Count > 0 && context != null && context.Test != null)
         {
             string className = context.Test.ClassName;
             if (!tempLog.ContainsKey(className))
             {
                 tempLog[className] = new HtmlListener();
             }
             BaseListener listener = tempLog[className];
             CurrentListener = listener;
             listener.LogSetUpDescription();
         }
     }
     catch (Exception ex)
     {
         if (isLogAllowed)
         {
             Console.WriteLine("Exception: {0}. Stacktrace: {1}", ex.Message, ex.StackTrace);
         }
     }
 }
Esempio n. 2
0
        public static void PrintTestInit()
        {
            TestContext context = TestContext.CurrentContext;

            if (isLogAllowed && context != null && context.Test != null)
            {
                string className = context.Test.ClassName;
                if (!tempLog.ContainsKey(className))
                {
                    tempLog[className] = new HtmlListener();
                }
                CurrentListener = tempLog[className];
            }
        }