bodiam
12/21/2016, 1:08 AMexpect:
service.mostLikelyForName(name, [
new Hotel(name: name1),
new Hotel(name: name2)
])?.name == expected
where:
name | name1 | name2 || expected
'Thredbo YHA Hostel' | 'Thredbo Chalets' | 'Thredbo YHA Hostel' || 'Thredbo YHA Hostel'
'The Station' | 'Thredbo Chalets' | 'The Station Hotel' || null
'The Station Hotel' | 'Thredbo Chalets' | 'The Station Hotel' || 'The Station Hotel'