예제 #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
        }
예제 #2
0
        public DeploymentResult Execute()
        {
            var result = new DeploymentResult();
            var to     = new DotNetPath().GetFullPath(_to);

            var toParent = GetRootShare(to);

            try
            {
                using (var context = FileShareAuthenticator.BeginFileShareAuthentication(toParent, _userName, _password))
                {
                    result.AddGood("'{0}' authenticated with {1}.".FormatWith(to, _userName));
                }
            }
            catch (Exception err)
            {
                result.AddError("Failed to access '{0}' as user '{1}'".FormatWith(toParent, _userName), err);
            }
            return(result);
        }
예제 #3
0
        public DeploymentResult VerifyCanRun()
        {
            var    result   = new DeploymentResult();
            var    to       = new DotNetPath().GetFullPath(_to);
            string toParent = GetRootShare(to);

            try
            {
                using (var context = FileShareAuthenticator.BeginFileShareAuthentication(toParent, _userName, _password))
                {
                    result.AddGood(System.IO.Directory.Exists(to) ? "'{0}' already exists.".FormatWith(to) : Name);
                }
            }
            catch (Exception err)
            {
                result.AddError("Failed to access '{0}' as user '{1}'".FormatWith(toParent, _userName), err);
            }
            //TODO figure out a good verify step...
            return(result);
        }
예제 #4
0
 public void Setup()
 {
     _path = new DotNetPath();
 }
예제 #5
0
 public void Setup()
 {
     _path = new DotNetPath();
 }
 public ProtoNServiceBusInstallTask(DotNetPath path, string location)
 {
     _path     = path;
     _location = location;
 }