This method checks if the car has info
or not with the given searchKey.If info with the given searchKey is found
return 'true'
.
For example 1
returns
'true
If no info with the given searchKey is found
return 'false
.
For example 5
returns
'false'
If If parameter searchKey is missing 'false'
is returned
For example
returns
'false'
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getHasInfo(1);
return 'true'
;
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getHasInfo(5);
return 'false'
;
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getHasInfo();
return 'false'
;
Test uses the default data.
Create register with default data.
const register = new carRegister(defaultData);
register.getHasInfo("");
return 'false'
;