public void Size2D_Parse_CanRoundTrip() { var size1 = Size2D.Parse("123.4 456.7"); var size2 = Size2D.Parse(size1.ToString()); TheResultingValue(size1 == size2).ShouldBe(true); }
public void Size2D_Parse_SucceedsForValidStrings() { var str = "123.45 456.78"; var result = Size2D.Parse(str); TheResultingValue(result) .ShouldBe(123.45, 456.78); }
public void Size2D_Parse_FailsForInvalidStrings() { Assert.That(() => Size2D.Parse("foo"), Throws.TypeOf <FormatException>()); }