public void TestConstructorValidNoDataType()
 {
     AdifFieldParts parts = new AdifFieldParts("<Time:6>123456");
     Assert.AreEqual("Time", parts.Field);
     Assert.AreEqual("", parts.DataType);
     Assert.AreEqual("123456", parts.Value);
     Assert.AreEqual(null, parts.Enumeration);
 }
 public void TestConstructorValidRange()
 {
     AdifFieldParts parts = new AdifFieldParts("<USERDEF3:8:N>ShoeSize,{5:20}");
     Assert.AreEqual("USERDEF3", parts.Field);
     Assert.AreEqual("N", parts.DataType);
     Assert.AreEqual("ShoeSize", parts.Value);
     string err = string.Empty;
     Assert.AreEqual("5", parts.LowerValue);
     Assert.AreEqual("20", parts.UpperValue);
 }
 public void TestConstructorValidEnumeration()
 {
     AdifFieldParts parts = new AdifFieldParts("<Userdef1:19:E>SweaterSize,{S,M,L}");
     Assert.AreEqual("Userdef1", parts.Field);
     Assert.AreEqual("E", parts.DataType);
     Assert.AreEqual("SweaterSize", parts.Value);
     string err = string.Empty;
     Assert.IsTrue(parts.Enumeration.IsInEnumeration("S", out err));
     Assert.IsTrue(parts.Enumeration.IsInEnumeration("M", out err));
     Assert.IsTrue(parts.Enumeration.IsInEnumeration("L", out err));
     Assert.IsFalse(parts.Enumeration.IsInEnumeration("XL", out err));
 }
 public void TestConstructorBadRange2()
 {
     AdifFieldParts parts = new AdifFieldParts("<USERDEF3:8:N>ShoeSize,{20:E}");
     Assert.AreEqual(null, parts.Field);
 }