/// <summary> /// Assures that the results directory exists. If the results directory /// cannot be created, fails the test. /// </summary> protected internal static void AssureResultsDirectoryExists(String resultsDirectory) { FileInfo dir = new FileInfo(resultsDirectory); bool tmpBool; if (File.Exists(dir.FullName)) { tmpBool = true; } else { tmpBool = Directory.Exists(dir.FullName); } if (!tmpBool) { RuntimeSingleton.Info("Template results directory does not exist"); Boolean ok = true; try { Directory.CreateDirectory(dir.FullName); } catch (Exception) { ok = false; } if (ok) { RuntimeSingleton.Info("Created template results directory"); } else { String errMsg = "Unable to create template results directory"; RuntimeSingleton.Warn(errMsg); Assert.Fail(errMsg); } } }
/// <summary> /// Log an info message. /// </summary> /// <param name="message">message to log</param> public static void Info(Object message) { RuntimeSingleton.Info(message); }