private void Button_Click(object sender, RoutedEventArgs e) { var userName = UsernameTextBox.Text; var password = PasswordTextBox.Text; if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(password)) { //return error message } var downTorrents = new AddTorrentsToClient(); var uClient = downTorrents.GetCreateClient("http://127.0.0.1:8888/gui/", "Gerras", "Jeenyus1"); }
public void GetCreateClientTest() { var newClient = new AddTorrentsToClient(); var client = newClient.GetCreateClient("http://127.0.0.1:8888/gui/", "Gerras", "Jeenyus"); try { //This throws an exception that isn't handled properly. Not exactly sure what is going on. var dir = client.StorageDirectories; } catch (Exception) { Assert.Fail(); } Assert.True(true); }