Example #1
0
 public void FHLBApp()
 {
     //create local share
     var path = new DotNetPath();
     var x = path.ConvertUncShareToLocalPath(new DeploymentServer("sellersd"), @"~\FHLBWinSvc\Bill");
     Assert.AreEqual("D:\\Development\\cue_dep\\Shares\\FHLBWinSvc\\Bill", x);
     //remove local share
 }
        public void when_deploying_to_temp_share_should_convert_remote_path_successfully()
        {
            var path = new DotNetPath();

            string serverName = "127.0.0.1";
            string shareName = "yoyotemp";
            string destination = @".\temp";
            string sub_folder = "Bill";

            if (!Directory.Exists(destination)) {Directory.CreateDirectory(destination);}

            Win32Share.Create(serverName, shareName, destination, "yoyo");
            var x = path.ConvertUncShareToLocalPath(new DeploymentServer(serverName), @"~\{0}\{1}".FormatWith(shareName,sub_folder));
            Win32Share.Delete(serverName, shareName);

            Assert.AreEqual(Path.GetFullPath(Path.Combine(destination,sub_folder)) , x);
        }
 public void when_deploying_to_c_share_should_convert_remote_path_successfully()
 {
     var path = new DotNetPath();
     var x = path.ConvertUncShareToLocalPath(new DeploymentServer("127.0.0.1"), @"~\c$\Bill");
     Assert.AreEqual("C:\\Bill", x);
 }