Beispiel #1
0
        public void ConvertLocalPathToUnc()
        {
            var path     = "E:\\bob\\bill";
            var expected = @"\\{0}\E$\bob\bill".FormatWith(Environment.MachineName);
            var actual   = RemotePathHelper.Convert(Environment.MachineName, path);

            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
        public void ConvertRemotePathToUnc()
        {
            var server   = "SrvTopeka01";
            var path     = "E:\\bob\\bill";
            var expected = @"\\SrvTopeka01\E$\bob\bill";
            var actual   = RemotePathHelper.Convert(server, path);

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
        public void WhatShouldWeDoIfYouProvideUncAndTheServerIsDifferent()
        {
            var server   = "SrvTopeka01";
            var path     = "bob\\bill";
            var expected = @"\\SrvTopeka01\bob\bill";
            var actual   = RemotePathHelper.Convert(server, path);

            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
        public void ShouldBeAbleToUseTilda()
        {
            var server   = "SrvTopeka01";
            var path     = "~\\bob\\bill";
            var expected = @"\\SrvTopeka01\bob\bill";
            var actual   = RemotePathHelper.Convert(server, path);

            Assert.AreEqual(expected, actual);
        }