public void WhenDeletingExtraWithInvalidId_ExceptionIsThrown(string selection) { CarLogic logic = new CarLogic(); logic.SetRepositoryInterface(this.mockedRepository.Object); Assert.Throws(typeof(InvalidParameterException), () => logic.DeleteExtra(selection)); }