public void Setup() { var parameters = new ParametersCollection(";", "="); parameters.AddValue("type", "i"); _url = new FtpUrl("ftp://temp.uri/whatever/path;type=i", "ftp", null, null, "temp.uri", 21, "/whatever/path", parameters, "whatever", "path"); }
private string CreateUrl(string fileName) { string path; var url = FtpUrl.EndsWith("/") ? FtpUrl.Remove(FtpUrl.Length - 1) : FtpUrl; if (Dir.StartsWith("/") || Dir.EndsWith("/")) { path = Dir; if (path.StartsWith("/")) { path = Dir.Substring(1); } if (path.EndsWith("/")) { path = path.Remove(path.Length - 1); } } else { path = Dir; } return("ftp://" + url + ":" + Port.ToString() + "/" + path + "/" + fileName); }
/// <summary>Exposes the <see cref="System.Security.Policy.Url" /> assertions extension.</summary> /// <param name="url">The subject URL.</param> /// <returns>Assertions for a given <paramref name="url" />.</returns> public static FtpUrlAssertions Should(this FtpUrl url) { return(new FtpUrlAssertions(url)); }
public void Teardown() { _url = null; }