public void CorrectedLocalPath_HandlesNetworkDriveCorrectly()
        {
            var path    = "//myserver/myfolder/myfile.htm";
            var url     = path.ToLocalhost();
            var request = new PretendRequestInfo(url);
            var result  = ServerBase.CorrectedLocalPath(request);

            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + path));

            // This tests the condition leading to BL-2932.
            request = new PretendRequestInfo(url, forPrinting: true);
            result  = ServerBase.CorrectedLocalPath(request);
            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + "OriginalImages/" + path));
        }
        public void CorrectedLocalPath_HandlesLocalDriveCorrectly()
        {
            var path    = "C:/Users/myname/Documents/Bloom/My Collection/My Book/My Book.htm";
            var url     = path.ToLocalhost();
            var request = new PretendRequestInfo(url);
            var result  = ServerBase.CorrectedLocalPath(request);

            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + path));

            request = new PretendRequestInfo(url, forPrinting: true);
            result  = ServerBase.CorrectedLocalPath(request);
            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + "OriginalImages/" + path));

            path    = "/home/myname/Bloom/My Collection/My Book/My Book.htm";
            url     = path.ToLocalhost();
            request = new PretendRequestInfo(url);
            result  = ServerBase.CorrectedLocalPath(request);
            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + path));

            request = new PretendRequestInfo(url, forPrinting: true);
            result  = ServerBase.CorrectedLocalPath(request);
            Assert.That(result, Is.EqualTo(ServerBase.BloomUrlPrefix + "OriginalImages/" + path));
        }