Example #1
0
        public void MirrorWithLowestScoreIsFastest()
        {
            var resolver = new FastestMirrorResolver(new TestScore());

            var uris = _testHosts.Select(_ => new Uri(_));

            var fastest = resolver.Fastest(uris);

            Assert.That(fastest.DnsSafeHost, Is.EqualTo("b.test"));
        }
        public void MirrorWithLowestScoreIsFastest()
        {
            var resolver = new FastestMirrorResolver(new TestScore());

            var uris = _testHosts.Select(_ => new Uri(_));

            var fastest = resolver.Fastest(uris);

            Assert.That(fastest.DnsSafeHost, Is.EqualTo("b.test"));
        }
Example #3
0
        /// <summary>
        /// Resolves the fastest Uri in a collection.
        /// </summary>
        /// <param name="uris">Enumerable collection of Uris.</param>
        /// <returns>Fastest Uri in the collection.</returns>
        public static Uri Fastest(this IEnumerable <Uri> uris)
        {
            var resolver = new FastestMirrorResolver(new PingScore());

            return(resolver.Fastest(uris));
        }
Example #4
0
        /// <summary>
        /// Resolves the fastest Uri in a collection.
        /// </summary>
        /// <param name="uris">Enumerable collection of Uris.</param>
        /// <returns>Fastest Uri in the collection.</returns>
        public static Uri Fastest(this IEnumerable<Uri> uris)
        {
            var resolver = new FastestMirrorResolver(new PingScore());

            return resolver.Fastest(uris);
        }