Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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);
        }