public void IncrementProgress_IncrementFirst_ValidateIncrementAndTimeEstimate() { // Increment pt 10 times with delay ProgressTracker pt = new ProgressTracker(20); for (int i = 0; i < 10; i++) { pt.IncrementProgress(); Thread.Sleep(100); } // Validate increment Assert.Equal(10, pt.ProcessedItems); Assert.NotEqual(DateTime.MinValue, pt.StartTime); // Validate time estimate var estMs = pt.GetEstimatedRemainingTime().TotalMilliseconds; Assert.True(estMs >= 1000); Assert.True(estMs <= 1500); }