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 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); }
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); }
public void Setup() { _path = new DotNetPath(); }
public ProtoNServiceBusInstallTask(DotNetPath path, string location) { _path = path; _location = location; }