public void OperationManagerLoadsRunnerAndJobs() { ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object); ISolrOperationManager manager = new SolrOperationManager(_log.Object, runner); Assert.IsTrue(manager.OperationRunner.SolrOperations.Count(x => x.IsRunning) > 0); }
public void ViewModelLogOutputsCorrectValues() { SolrOperationManager operationManager = new SolrOperationManager(new SolrLog(null, false), new Mock <ISolrOperationRunner>().Object); SolrJobLogViewModel viewModel = new SolrJobLogViewModel(operationManager); Assert.AreEqual(string.Empty, viewModel.Log); operationManager.SolrLog.AppendSolrAction(DateTime.Now, DateTime.Now, "Test", new SolrResponseObject(new SolrResponseHeader(), new SolrResponseStatus())); Assert.AreNotEqual(string.Empty, viewModel.Log); }