示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }