Esempio n. 1
0
        public void CalculateEstimatedTimeRemaining_ExpectedTimeRemainingString()
        {
            const int bundleSize    = 5000000;
            const int chunkSize     = 100000;
            const int startOfWindow = 100000;

            Assert.That(HgResumeTransport.CalculateEstimatedTimeRemaining(bundleSize, chunkSize, startOfWindow), Is.EqualTo("(about 4 minutes)"));
        }
Esempio n. 2
0
        public void CalculateEstimatedTimeRemaining_VeryLargeBundleSize_DoesNotThrow()
        {
            const int largeBundleSize = 2147000000;     // 2 GB
            const int chunkSize       = 5000;
            const int startOfWindow   = 100000;

            Assert.DoesNotThrow(() => HgResumeTransport.CalculateEstimatedTimeRemaining(largeBundleSize, chunkSize, startOfWindow));
        }