public void TestMoreFieldsValid() { AdifString aS = new AdifString("<call:5>VA3HJ <eor>"); Assert.IsTrue(aS.moreFields()); }
public void TestGetNextFieldValidData() { AdifString aS = new AdifString("<call:5>VA3HJ <qso_date:8>20080722" + "<time_on:6>061219 <eor>"); Assert.AreEqual(aS.getNextField(), "<call:5>VA3HJ"); Assert.AreEqual(aS.getNextField(), "<qso_date:8>20080722"); Assert.AreEqual(aS.getNextField(), "<time_on:6>061219"); Assert.AreEqual(aS.getNextField(), "<eor>"); }
public void TestGetNextFieldNoMoreFields() { AdifString aS = new AdifString("<call:5>VA3HJ <qso_date:8>20080722 " + "<time_on:6>061219 <eor>"); aS.getNextField(); aS.getNextField(); aS.getNextField(); aS.getNextField(); // should fail on this call aS.getNextField(); Assert.Fail("TestGetNextFieldNoMoreFields test failed"); }
public void TestGetNextFieldOverflowLength() { AdifString aS = new AdifString("<call:999999999999>VA3HJ<eor>"); aS.getNextField(); Assert.Fail("TestGetNextFieldOverflowLength test failed"); }
public void TestGetNextFieldBadDataLength() { AdifString aS = new AdifString("<call:F>VA3HJ<eor>"); aS.getNextField(); Assert.Fail("TestGetNextFieldBadDataLength test failed"); }