public void ShouldGetResourceLocation()
        {
            var wrappedUrl = "http://goo.gl/mSkqOi";
            var subject    = new WebClientUrlUnwrapper();

            WebClientUrlUnwrapper.ResolveUrls = true;

            var directUrl = subject.GetDirectUrl(wrappedUrl);

            directUrl.Should().Be("http://example.com/");

            WebClientUrlUnwrapper.ResolveUrls = false;
        }
        public void ShouldReturnGivenLocationIfAuthenticationRequired()
        {
            var givenUrl = "http://durwella.com/testing/does-not-exist";
            var subject  = new WebClientUrlUnwrapper
            {
                IgnoreErrorCodes = new[] { HttpStatusCode.NotFound }
            };

            WebClientUrlUnwrapper.ResolveUrls = true;

            var directUrl = subject.GetDirectUrl(givenUrl);

            directUrl.Should().Be(givenUrl);

            WebClientUrlUnwrapper.ResolveUrls = false;
        }