public void op_FromString_stringEmpty() { var expected = string.Empty; var actual = Telephone.FromString(expected).ToString(); Assert.Equal(expected, actual); }
public void op_ToString() { const string expected = "+441111222333"; var actual = Telephone.FromString(expected).ToString(); Assert.Equal(expected, actual); }
public void op_FromString_string() { const string value = "+441111222333"; var obj = Telephone.FromString(value); Assert.Equal(value, obj.Number); }
public void prop_Number() { Assert.True(new PropertyExpectations <BritishTelephone>(p => p.Number) .IsNotDecorated() .TypeIs <Telephone>() .ArgumentNullException() .Set(Telephone.FromString("(01234) 567 890")) .Result); }
public BritishTelephoneNumberPlanItem Item(string telephone) { return(Item(Telephone.FromString(telephone))); }
public void op_FromString_string_whenMissingLeadingZero() { var obj = Telephone.FromString("1111222333"); Assert.Equal("+441111222333", obj.Number); }
public void op_FromString_string_whenLongInternationalFormat() { var obj = Telephone.FromString("00441111222333"); Assert.Equal("+441111222333", obj.Number); }
public void op_FromString_string_whenDomesticFormatAndComment() { var obj = Telephone.FromString("(01111) 222-333 at home"); Assert.Equal("+441111222333", obj.Number); }
public void op_FromString_stringNull() { Assert.Throws <ArgumentNullException>(() => Telephone.FromString(null)); }
public void op_FromString_string_whenShortInternationalFormat() { var obj = Telephone.FromString("+1 (222) 333-4444"); Assert.Equal("+12223334444", obj.Number); }
public void op_FromString_string_whenNoDigits() { var obj = Telephone.FromString("not a number"); Assert.Null(obj.Number); }