public void CreateOutputDirectoryTest() { var download = new AddTorrentsToClient(); var dirOutput = download.CreateOutputDirectory("Archer.2009.S05E12.HDTV.x264-KILLERS.[BTN].torrent"); const string testDirOutput = @"Archer 2009\Season 5\"; Assert.AreEqual(testDirOutput, dirOutput); }
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); }
public void AddTorrentstoClientTest() { var addTorrents = new AddTorrentsToClient(); addTorrents.AddTorrentstoClient("http://127.0.0.1:8888/gui/", "Gerras", "Jeenyus1", @"E:\Video Files\Downloads", @"E:\Video Files\Torrents\"); Assert.True(true); }