public void Info_CreatesLogFile() { InitializeLogger(); PluginLogger.GetInstance().Info("Info"); PluginLogger.GetInstance().DeInit(); Assert.IsTrue(File.Exists(Path.Combine(LogDirPath, LogFileName))); File.Delete(Path.Combine(LogDirPath, LogFileName)); }
public void Error_CreatesLogFile() { var exception = new Exception("message", new Exception("inner message", new Exception("inner most message"))); InitializeLogger(); PluginLogger.GetInstance().Error(exception); PluginLogger.GetInstance().DeInit(); Assert.IsTrue(File.Exists(Path.Combine(LogDirPath, LogFileName))); File.Delete(Path.Combine(LogDirPath, LogFileName)); }
private KaptureConfig(string appDataFolder) { try { Config = new Model.Config(); var configFilePath = Path.Combine(appDataFolder, KaptureConfigConstants.ConfigDirName); ConfigManager.Initialize(configFilePath, KaptureConfigConstants.ConfigFileName, Config); ConfigManager = (ConfigManager)ConfigManager.GetInstance(); ConfigManager.LoadSettings(); } catch (Exception ex) { PluginLogger.GetInstance().Error(ex); } }
public void Initialize_Again_NoChange() { InitializeLogger(); InitializeLogger(); Assert.IsNotNull(PluginLogger.GetInstance()); }