public void CarTypeMaxBoundaryOK()
        {
            clsCarType ACarType    = new clsCarType();
            String     Error       = "";
            string     SomeCarType = "aaaaaaaa";

            Error = ACarType.Valid(SomeCarType);
            Assert.AreEqual(Error, "");
        }
        public void ValidMethodOK()
        {
            clsCarType ACarType    = new clsCarType();
            String     Error       = "";
            string     SomeCarType = "HatchBack";

            Error = ACarType.Valid(SomeCarType);
            Assert.AreEqual(Error, "");
        }
        public void CarExtremeMaxOK()
        {
            clsCarType ACarType    = new clsCarType();
            String     Error       = "";
            string     SomeCarType = "";

            SomeCarType = SomeCarType.PadRight(500, 'a');
            Error       = ACarType.Valid(SomeCarType);
            Assert.AreNotEqual(Error, "");
        }
示例#4
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        clsCarType ACarType = new clsCarType();
        string     Error;
        String     CarTypeName;

        CarTypeName     = txtCarType.Text;
        Error           = ACarType.Valid(CarTypeName);
        lblCarType.Text = Error;
    }