This page test that parsers can extract telephone numbers from different structures. This includes type property and value excerpting test. The IsEqualToPhoneNumber method canonicalises and compares phone numbers.
From: hCard test suite 1.0
Tests:
Test | Result | Comment |
---|---|---|
vcard[0].tel[0].value | IsEqualTo("xyz") | Should collect the telephone number from the node text |
vcard[1].tel[0].value | IsEqualToPhoneNumber("xyz") | Should collect the telephone number from a descendant node with value property |
vcard[2].tel[0].type[12] | IsEqualToCaseInsensitive("PCS") | Should find the type value. Types are case insensitive |
vcard[3].tel[0].type[1] | HasProperty(false) | The second type value "next-door" is incorrect |
vcard[4].tel[0].value | IsEqualToPhoneNumber("xyz") | Where a type is specified, but the value is not then the node text is the value |
History:
John Doe - xyz:
John Doe - preferred: xyz