Exemplo n.º 1
0
        public void CircleF_TryParse_FailsForInvalidStrings()
        {
            var result    = default(CircleF);
            var succeeded = CircleF.TryParse("foo", out result);

            TheResultingValue(succeeded).ShouldBe(false);
        }
Exemplo n.º 2
0
        public void CircleF_TryParse_SucceedsForValidStrings()
        {
            var str    = "123.45 456.78 100.10";
            var result = default(CircleF);

            if (!CircleF.TryParse(str, out result))
            {
                throw new InvalidOperationException("Unable to parse string to CircleF.");
            }

            TheResultingValue(result)
            .ShouldHavePosition(123.45f, 456.78f)
            .ShouldHaveRadius(100.10f);
        }