public void DisplayFormat()
        {
            var row = new MyCar
            {
                Code   = "ABZ-01",
                Milage = 150000
            };

            Aver.AreEqual("150000", row["Milage"].ToString());
            Aver.AreEqual("Milage: 150,000 miles", row.GetDisplayFieldValue("Milage"));
        }
        public void FieldValueDescription()
        {
            var row = new MyCar();

            row.Sex = "F";
            Aver.AreEqual("Female", row.GetFieldValueDescription("Sex"));

            row.Sex = "M";
            Aver.AreEqual("Male", row.GetFieldValueDescription("Sex"));

            row.Sex = "U";
            Aver.AreEqual("Unknown", row.GetFieldValueDescription("Sex"));
        }
        public void ValidateRegexp()
        {
            var row = new MyCar
            {
                Code = "adsd"
            };

            var ve = row.Validate();

            Aver.IsNotNull(ve);
            Aver.IsTrue(ve.Message.Contains("Allowed characters: A-Z,0-9,-"));
            ve.ToMessageWithType().See();

            row.Code = "AZ-90";
            ve       = row.Validate();
            Aver.IsNull(ve);
        }