Пример #1
0
        public void StartAndStopLocalMongo()
        {
            var mongoProcessManager = new LocalMongoProcessManager();

            mongoProcessManager.StartMongoProcess();
            mongoProcessManager.IsMongoRunning().Should().Be(true);

            mongoProcessManager.KillAllMongoProcesses();
            mongoProcessManager.IsMongoRunning().Should().Be(false);
        }
Пример #2
0
 /// <summary>
 /// Shutdown a local MongoDB instances, if it is currently running.
 /// </summary>
 public static void ShutDownLocalMongoDbInstance(LocalMongoProcessManager localMongoProcessManager)
 {
     if (localMongoProcessManager != null && localMongoProcessManager.IsMongoRunning())
     {
         Log.InfoFormat("Shutting down local MongoDB process..");
         localMongoProcessManager.KillAllMongoProcesses();
     }
 }