@Test public void characterInputCalculateTest() throws NumberFormatException { String width = "1"; String length = "A"; String height = "3"; thrown.expect(NumberFormatException.class); thrown.expectMessage("For input string: \"A\""); mainViewModel.calculate(width, length, height); }
void calculate(String width, String height, String length) { result = Integer.parseInt(width) * Integer.parseInt(height) * Integer.parseInt(length); }
MainViewModel extends ViewModel { void calculate(String width, String height, String length) { result = Integer.parseInt(width) * Integer.parseInt(height) * Integer.parseInt(length); } }
MainViewModel extends ViewModel { void calculate(String width, String height, String length) { result = Integer.parseInt(width) * Integer.parseInt(height) * Integer.parseInt(length); }  }
MainViewModel extends ViewModel { void calculate(String width, String height, String length) { result = Integer.parseInt(width) * Integer.parseInt(height) * Integer.parseInt(length); }   }
MainViewModel extends ViewModel { void calculate(String width, String height, String length) { result = Integer.parseInt(width) * Integer.parseInt(height) * Integer.parseInt(length); }    }