Example #1
0
 public void LookupTar()
 {
     QrzServer server = new QrzServer("M0VFC", "g3pyeflossie");
     QrzEntry entry = server.LookupCallsign("g0tar");
     Console.WriteLine("{0}, {1}, {2}", entry.Callsign, entry.Name, entry.Locator);
     Assert.IsNotNull(entry);
     Assert.IsNotNull(entry.Callsign);
     Assert.IsNotNull(entry.Name);
     Assert.IsNull(entry.Locator);
 }
Example #2
0
 public void FailedLogin()
 {
     try
     {
         QrzServer server = new QrzServer("M0VFC", "random");
         server.Login();
         Assert.Fail("Expected login to fail with random password");
     }
     catch (InvalidDataException ex)
     {
         Assert.That(ex.Message.Contains("Login"), "Expected message to indicate login failure");
     }
 }
Example #3
0
 private void QrzUserSetupToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (QrzUserSetup QrzSetup = new QrzUserSetup())
     {
         DialogResult dr = QrzSetup.ShowDialog();
         if (dr == DialogResult.OK)
         {
             Settings.Set("QRZUsername", QrzSetup.QrzUsername);
             Settings.Set("QRZPassword", QrzSetup.QrzPassword);
             m_QrzServer = new QrzServer(Settings.Get("QRZUsername", ""), Settings.Get("QRZPassword", ""));
         }
     }
 }
Example #4
0
 public void Login()
 {
     QrzServer server = new QrzServer("M0VFC", "g3pyeflossie");
     server.Login();
 }