public void Size2_Parse_CanRoundTrip() { var size1 = Size2.Parse("123 456"); var size2 = Size2.Parse(size1.ToString()); TheResultingValue(size1 == size2).ShouldBe(true); }
public void Size2_Parse_SucceedsForValidStrings() { var str = "123 456"; var result = Size2.Parse(str); TheResultingValue(result) .ShouldBe(123, 456); }
public void Size2_Parse_FailsForInvalidStrings() { Assert.That(() => Size2.Parse("foo"), Throws.TypeOf <FormatException>()); }