public void CarTypeNumberPropertyOK()
        {
            clsCarType ACarType    = new clsCarType();
            int        SomeCarType = 1;

            ACarType.CarTypeNo = SomeCarType;
            Assert.AreEqual(ACarType.CarTypeNo, SomeCarType);
        }
        public void CarTypePropertyOK()
        {
            clsCarType ACarType    = new clsCarType();
            string     SomeCarType = "HatchBack";

            ACarType.CarType = SomeCarType;
            Assert.AreEqual(ACarType.CarType, SomeCarType);
        }
        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, "");
        }
Exemple #6
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;
    }
        public void CountMatchesList()
        {
            clsCarTypeCollection CarTypes = new clsCarTypeCollection();
            List <clsCarType>    TestList = new List <clsCarType>();
            clsCarType           TestItem = new clsCarType();

            TestItem.CarTypeNo = 1;
            TestItem.CarType   = "Hatchback";
            TestList.Add(TestItem);
            CarTypes.AllCarTypes = TestList;
            Assert.AreEqual(CarTypes.Count, TestList.Count);
        }
        public void InstanceOK()
        {
            clsCarType ACarType = new clsCarType();

            Assert.IsNotNull(ACarType);
        }