예제 #1
0
  @Test
  public void getLongInputException() throws RuntimeException {
    exception.expect(RuntimeException.class);
    exception.expectMessage("The input value must be a long number.");

    InputUtils.getLongInput("Still doesn't work in this way", 0);
  }
예제 #2
0
 @Test
 public void getLongInputDefault() {
   long testLong = InputUtils.getLongInput("", 1024L);
   assertEquals(1024L, testLong);
 }
예제 #3
0
 @Test
 public void getLongInput() {
   long testLong = InputUtils.getLongInput("4096", 1024L);
   assertEquals(4096L, testLong);
 }