This methods returns the price of a car with the given number.
For example 1
returns
300
If no car with the given number is found throws an exeption 'nothing found with given number'
If a parameter number is missing, throws an exeption 'missing parameter'
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getPrice(1);
expect
300
to be returned
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getPrice(6);
throws an exeption 'nothing found with given number'