Пример #1
0
        public void Size2D_Parse_CanRoundTrip()
        {
            var size1 = Size2D.Parse("123.4 456.7");
            var size2 = Size2D.Parse(size1.ToString());

            TheResultingValue(size1 == size2).ShouldBe(true);
        }
Пример #2
0
        public void Size2D_Parse_SucceedsForValidStrings()
        {
            var str    = "123.45 456.78";
            var result = Size2D.Parse(str);

            TheResultingValue(result)
            .ShouldBe(123.45, 456.78);
        }
Пример #3
0
 public void Size2D_Parse_FailsForInvalidStrings()
 {
     Assert.That(() => Size2D.Parse("foo"),
                 Throws.TypeOf <FormatException>());
 }