예제 #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
        }
예제 #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
        }
예제 #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
        }