Ejemplo n.º 1
0
        public void Text_ExpectInvalid()
        {
            //arrange
            Repairbook RepairTest = new Repairbook();

            RepairTest.Plate = v_Plate;
            RepairTest.Text  = "";
            //act
            RepairTest.SaveToDb(DB);
            //assert
            //should handle with ArgumentException
        }
Ejemplo n.º 2
0
        public void Price_ExceptInvalid()
        {
            //arrange
            Repairbook RepairTest = new Repairbook();

            RepairTest.Plate = v_Plate;
            RepairTest.Text  = v_Text;
            RepairTest.Price = -1;
            //act
            RepairTest.SaveToDb(DB);
            //assert
            //should handle with ArgumentOutOfRangeException
        }
Ejemplo n.º 3
0
        public void SaveToDb_ExpectValid()
        {
            //arrange
            Repairbook RepairTest = new Repairbook();

            RepairTest.Plate = v_Plate;
            RepairTest.Text  = v_Text;
            RepairTest.Price = v_Price;
            //act
            RepairTest.SaveToDb(DB);
            //assert
            //should handle with no exceptions
        }