Test expected an Exception, Exception was thrown (it shows in the output) but test failed anyway

后端 未结 3 1787
一整个雨季
一整个雨季 2021-01-27 07:17

Hi so there\'s a test for a constructor for a vehicle. The test initializes a vehicle with a driver without a driving license and it should throw an Exception. code constructor

3条回答
  •  无人共我
    2021-01-27 07:51

    You are actually catching the exception in the catch block. That's why your test failed not getting the expected exception.

提交回复
热议问题