Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 public void Initialize_Again_NoChange()
 {
     InitializeLogger();
     InitializeLogger();
     Assert.IsNotNull(PluginLogger.GetInstance());
 }