public void CircleF_Parse_CanRoundTrip() { var circle1 = CircleF.Parse("123.4 456.7 100"); var circle2 = CircleF.Parse(circle1.ToString()); TheResultingValue(circle1 == circle2).ShouldBe(true); }
public void CircleF_Parse_SucceedsForValidStrings() { var str = "123.45 456.78 100.10"; var result = CircleF.Parse(str); TheResultingValue(result) .ShouldHavePosition(123.45f, 456.78f) .ShouldHaveRadius(100.10f); }
public void CircleF_Parse_FailsForInvalidStrings() { Assert.That(() => CircleF.Parse("foo"), Throws.TypeOf <FormatException>()); }