public void ProteinService_Refresh_ReturnsProteinChanges() { // Arrange var summaryService = CreateProjectSummaryService(); var service = new ProteinService(new ProteinDataContainer(), summaryService, Logging.TestLogger.Instance); // Act var changes = service.Refresh(null); // Assert Assert.AreEqual(624, changes.Count); }
public void ProteinService_Refresh_RefreshesProjects() { // Arrange var summaryService = CreateProjectSummaryService(); var service = new ProteinService(new ProteinDataContainer(), summaryService, Logging.TestLogger.Instance); Assert.AreEqual(0, service.GetProjects().Count()); // Act service.Refresh(null); // Assert Assert.AreNotEqual(624, service.GetProjects().Count()); }
public void ProteinService_RefreshRemovesFromProjectsNotFound_Test() { // Arrange var summaryService = CreateProjectSummaryService(); var service = new ProteinService(new ProteinDataContainer(), summaryService, Logging.TestLogger.Instance); service.LastProjectRefresh.Add(6940, DateTime.MinValue); // Act service.Refresh(null); // Assert Assert.IsFalse(service.LastProjectRefresh.ContainsKey(6940)); }
public void ProteinService_Refresh_UpdatesRefreshProperties() { // Arrange var summaryService = CreateProjectSummaryService(); var service = new ProteinService(new ProteinDataContainer(), summaryService, Logging.TestLogger.Instance); service.LastProjectRefresh.Add(2968, DateTime.MinValue); service.LastRefresh = DateTime.MinValue; // Act service.Refresh(null); // Assert Assert.AreNotEqual(DateTime.MinValue, service.LastProjectRefresh[2968]); Assert.AreNotEqual(DateTime.MinValue, service.LastRefresh); }