Пример #1
0
 public void Null_interstellar_is_not_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance(null)).IsNull();
 }
Пример #2
0
 public void Empty_interstellar_is_not_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance("")).IsNull();
 }
Пример #3
0
 public void Invalid_interstellar_is_not_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance("not a distance")).IsNull();
 }
Пример #4
0
 public void Interstellar_distance_with_comma_decimal_separator_can_be_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance("12345,6789")).IsEqualTo(12345.6789);
 }
Пример #5
0
 public void Negative_interstellar_distance_is_not_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance("-12345")).IsEqualTo(null);
 }
Пример #6
0
 public void Interstellar_distance_without_any_decimal_separator_can_be_parsed()
 {
     Check.That(DistanceParser.ParseInterstellarDistance("12345")).IsEqualTo(12345);
 }