public void testGetWindSpeed_Nautical() { BuoyDetailViewModel viewModel = new BuoyDetailViewModel(WIND_CONDTIONS, WAVE_CONDITION, makeNauticalPreferences()); viewModel.updateWindSpeed(mockInstrument); assertThat(mockInstrument.value).isEqualTo("10.0"); assertThat(mockInstrument.units).isEqualTo("kts"); }
@Test public void testGetWindSpeed_Metric() { BuoyDetailViewModel viewModel = new BuoyDetailViewModel(WIND_CONDTIONS, WAVE_CONDITION, makeMetricPreferences()); viewModel.updateWindSpeed(mockInstrument); assertThat(mockInstrument.value).isEqualTo("18.5"); assertThat(mockInstrument.units).isEqualTo("kph"); }