예제 #1
0
 public void TestInvalidManagerCall()
 {
     QsoInputData iData = new QsoInputData();
     iData.Manager = "VAHJ";
     string error = iData["Manager"];
     Assert.AreEqual("Not a valid callsign", error);
 }
예제 #2
0
 public void TestInvalidStartDate()
 {
     QsoInputData iData = new QsoInputData();
     iData.StartDate = "19291231";
     string error = iData["StartDate"];
     Assert.AreEqual("\tDate must be 19300101 or later.", error);
 }
예제 #3
0
 public void TestInvalidCallsign()
 {
     QsoInputData iData = new QsoInputData();
     iData.Callsign = "VAHJ";
     string error = iData["Callsign"];
     Assert.AreEqual("Not a valid callsign", error);
 }
예제 #4
0
 public void TestInvalidMode()
 {
     QsoInputData iData = new QsoInputData();
     iData.Mode = "SQUIBB";
     string error = iData["Mode"];
     Assert.AreEqual(null, error);
 }
예제 #5
0
 public void TestInvalidManagerModifiers()
 {
     QsoInputData iData = new QsoInputData();
     iData.Manager = "VA3HJ/W4";
     string error = iData["Manager"];
     Assert.AreEqual("Manager callsign must not contain modifiers (e.g. VA3HJ, not XE1/VA3HJ)",
                     error);
 }
예제 #6
0
 public void TestValidStartTime()
 {
     QsoInputData iData = new QsoInputData();
     iData.StartTime = "122539";
     string error = iData["StartTime"];
     Assert.IsNull(error);
 }
예제 #7
0
 public void TestValidStartDate()
 {
     QsoInputData iData = new QsoInputData();
     iData.StartDate = "20130615";
     string error = iData["StartDate"];
     Assert.IsNull(error);
 }
예제 #8
0
 public void TestValidMode()
 {
     QsoInputData iData = new QsoInputData();
     iData.Mode = "SSB";
     string error = iData["Mode"];
     Assert.IsNull(error);
 }
예제 #9
0
 public void TestNullMode()
 {
     QsoInputData iData = new QsoInputData();
     iData.Mode = null;
     string error = iData["Mode"];
     Assert.AreEqual("Value is null.", error);
 }
예제 #10
0
 public void TestValidFreqNoBand()
 {
     QsoInputData iData = new QsoInputData();
     iData.Frequency = "21.203";
     string error = iData["Frequency"];
     Assert.IsNull(error);
 }
예제 #11
0
 public void TestValidFreqInvalidBand()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "11m";
     iData.Frequency = "28.453";
     string error = iData["Frequency"];
     Assert.AreEqual("Frequency is not within the selected band", error);
 }
예제 #12
0
 public void TestValidFreqDifferentBand()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "10m";
     iData.Frequency = "21.203";
     string error = iData["Frequency"];
     Assert.AreEqual("Frequency is not within the selected band", error);
 }
예제 #13
0
 public void TestValidCallsign()
 {
     QsoInputData iData = new QsoInputData();
     iData.Callsign = "VA3HJ";
     string error = iData["Callsign"];
     Assert.IsNull(error);
 }
예제 #14
0
 public void TestValidBandNoFreq()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "10m";
     string error = iData["Band"];
     Assert.IsNull(error);
 }
예제 #15
0
 public void TestValidBandInvalidFreq()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "10m";
     iData.Frequency = "27.453";
     string error = iData["Band"];
     Assert.AreEqual("Frequency is not within an enumerated ham band and therefore cannot be validated against this Band setting", error);
 }
예제 #16
0
 public void TestValidBandFreqDifferentBand()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "10m";
     iData.Frequency = "21.203";
     string error = iData["Band"];
     Assert.AreEqual("Band does not contain the specified frequency", error);
 }
예제 #17
0
 public void TestValidFreqValidBand()
 {
     QsoInputData iData = new QsoInputData();
     iData.Band = "10m";
     iData.Frequency = "28.453";
     string error = iData["Frequency"];
     Assert.IsNull(error);
 }
예제 #18
0
 public void TestValidManager()
 {
     QsoInputData iData = new QsoInputData();
     iData.Manager = "VA3HJ";
     string error = iData["Manager"];
     Assert.IsNull(error);
 }
예제 #19
0
 public void TestInvalidStartTimeBadTime()
 {
     QsoInputData iData = new QsoInputData();
     iData.StartTime = "252555";
     string error = iData["StartTime"];
     Assert.AreEqual("\tInvalid time.", error);
 }
예제 #20
0
 public void TestInvalidStartTimeLength()
 {
     QsoInputData iData = new QsoInputData();
     iData.StartTime = "12253";
     string error = iData["StartTime"];
     Assert.AreEqual("\tTime must be in HHMM or HHMMSS format.", error);
 }