Beispiel #1
0
        public void Size3F_Parse_CanRoundTrip()
        {
            var size1 = Size3F.Parse("123.4 456.7 789.1");
            var size2 = Size3F.Parse(size1.ToString());

            TheResultingValue(size1 == size2).ShouldBe(true);
        }
        public void Size3F_Parse_SucceedsForValidStrings()
        {
            var str    = "123.45 456.78 789.99";
            var result = Size3F.Parse(str);

            TheResultingValue(result)
            .ShouldBe(123.45f, 456.78f, 789.99f);
        }
 public void Size3F_Parse_FailsForInvalidStrings()
 {
     Assert.That(() => Size3F.Parse("foo"),
                 Throws.TypeOf <FormatException>());
 }