public void Jump_distance_with_comma_as_decimal_separator_is_parsed_correctly() { Check.That(DistanceParser.ParseJumpDistance("15,5")).IsEqualTo(15.5); }
public void Setup() { distanceParser = new DistanceParser(); }
public void Empty_jump_distance_is_not_parsed() { Check.That(DistanceParser.ParseJumpDistance("")).IsNull(); }
public void Jump_distance_without_decimals_is_parsed_correctly() { Check.That(DistanceParser.ParseJumpDistance("15")).IsEqualTo(15); }
public void Empty_interstellar_is_not_parsed() { Check.That(DistanceParser.ParseInterstellarDistance("")).IsNull(); }
public void Null_interstellar_is_not_parsed() { Check.That(DistanceParser.ParseInterstellarDistance(null)).IsNull(); }
public void Interstellar_distance_with_comma_decimal_separator_can_be_parsed() { Check.That(DistanceParser.ParseInterstellarDistance("12345,6789")).IsEqualTo(12345.6789); }
public void Invalid_interstellar_is_not_parsed() { Check.That(DistanceParser.ParseInterstellarDistance("not a distance")).IsNull(); }
public void Interstellar_distance_without_any_decimal_separator_can_be_parsed() { Check.That(DistanceParser.ParseInterstellarDistance("12345")).IsEqualTo(12345); }
public void Negative_interstellar_distance_is_not_parsed() { Check.That(DistanceParser.ParseInterstellarDistance("-12345")).IsEqualTo(null); }
public void Jump_distance_that_does_not_match_any_expected_format_is_not_parsed() { Check.That(DistanceParser.ParseJumpDistance("not a distance")).IsNull(); }
public void Jump_distance_with_more_than_2_decimals_is_not_parsed() { Check.That(DistanceParser.ParseJumpDistance("15.000")).IsNull(); }
public void Negative_jump_distance_is_not_parsed() { Check.That(DistanceParser.ParseJumpDistance("-15")).IsNull(); }
public void Jump_distance_equal_to_the_maximum_allowed_value_is_parsed_correctly() { Check.That(DistanceParser.ParseJumpDistance("15", 15)).IsEqualTo(15); }
public void Jump_distance_greater_than_the_maximum_allowed_value_is_not_parsed() { Check.That(DistanceParser.ParseJumpDistance("15", 14)).IsNull(); }