Ejemplo n.º 1
0
 public static void IsInstanceOfType(object value, Type expectedType, string message, params object[] parameters)
 {
     if (expectedType == null)
     {
         HandleFail("Assert.IsInstanceOfType expectedType == null", message, parameters);
     }
     if (!expectedType.IsInstanceOfType(value))
     {
         string str = TracingHelper.FormatMessage("Assert.IsInstanceOfType {0} is not {1}", value, expectedType);
         HandleFail(str, message, parameters);
     }
 }
Ejemplo n.º 2
0
        public static void Error(LogEventID eventId, Exception ex, string format, params object[] args)
        {
            string message = TracingHelper.FormatMessage(format, args) + "\r\n" + ex.ToString();

            WriteEventLog(EventLogEntryType.Error, message, eventId);
        }
Ejemplo n.º 3
0
        public static void Error(LogEventID eventId, string format, params object[] args)
        {
            string message = TracingHelper.FormatMessage(format, args);

            WriteEventLog(EventLogEntryType.Error, message, eventId);
        }
Ejemplo n.º 4
0
        internal static void HandleFail(string info, string extra, params object[] args)
        {
            string s = TracingHelper.FormatMessage(extra, args);

            throw new IICAssertFailedException("Failed! " + info + " \'" + s + "\'");
        }