@Test public void timeIsValid_whenGivenInRobotTimeFormat() { assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1. day")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-1.2 d")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("42 hours")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1. hour")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-1.2 h")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("42 minutes")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1. minute")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("42.1 mins")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1.2 min")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-123 m")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("42 seconds")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1. second")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1.2 sec")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-123 s")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("42 milliseconds")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1. millisecond")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("1.2 millis")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days 4 hours 1 minute 15 sec 123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("4 hours 1 minute 15 sec 123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days 1 minute 15 sec 123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days 4 hours 15 sec 123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days 4 hours 1 minute 123 ms")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("5 days 4 hours 1 minute 15 sec")).isTrue(); assertThat(RobotTimeFormat.isValidRobotTimeArgument("-5 days -4 hours -1 minute -15 sec -123 ms")).isTrue(); }
public static boolean isValidRobotTimeArgument(final String argument) { return isPlainNumber(argument) || isTimeString(argument) || isTimerString(argument); }
RobotTimeFormat { public static boolean isValidRobotTimeArgument(final String argument) { return isPlainNumber(argument) || isTimeString(argument) || isTimerString(argument); } }
RobotTimeFormat { public static boolean isValidRobotTimeArgument(final String argument) { return isPlainNumber(argument) || isTimeString(argument) || isTimerString(argument); }  }
RobotTimeFormat { public static boolean isValidRobotTimeArgument(final String argument) { return isPlainNumber(argument) || isTimeString(argument) || isTimerString(argument); }  static boolean isValidRobotTimeArgument(final String argument); }
RobotTimeFormat { public static boolean isValidRobotTimeArgument(final String argument) { return isPlainNumber(argument) || isTimeString(argument) || isTimerString(argument); }  static boolean isValidRobotTimeArgument(final String argument);  }