public void TestClientBrand( string canonical_name, string localPath, string remoteFolderPath, string url, string user, string password, string repositoryId, string binding) { ServerCredentials credentials = new ServerCredentials() { Address = new Uri(url), Binding = binding, UserName = user, Password = password }; var underTest = new ClientBrand(credentials, repositoryId, remoteFolderPath); Assert.That(underTest.SetupServer(credentials), Is.True); foreach (string path in underTest.PathList) { DateTime date; Assert.That(underTest.GetFileDateTime(path, out date), Is.True); using (var stream = new MemoryStream()) { Assert.That(underTest.GetFile(path, stream), Is.True); Assert.That(stream.Length, Is.GreaterThan(0)); } } }
public void TestServer( string canonical_name, string localPath, string remoteFolderPath, string url, string user, string password, string repositoryId, string binding) { ServerCredentials credentials = new ServerCredentials() { Address = new Uri(url), Binding = binding, UserName = user, Password = password }; var underTest = new ClientBrand(credentials, repositoryId, remoteFolderPath); Assert.That(underTest.TestServer(credentials), Is.True); }