Expose JID fields and rename to match XEP-0029 wording

See: XEP-0029 - Definition of Jabber Identifiers (JIDs)
https://xmpp.org/extensions/xep-0029.html
This commit is contained in:
Mickael Remond
2019-06-07 15:56:41 +02:00
parent 269f78b30d
commit 1be04b0fba
3 changed files with 23 additions and 23 deletions
+6 -6
View File
@@ -28,16 +28,16 @@ func TestValidJids(t *testing.T) {
t.Error("jid should not be nil")
}
if jid.username != tt.expected.username {
t.Errorf("incorrect jid username (%s): %s", tt.expected.username, jid.username)
if jid.Node != tt.expected.Node {
t.Errorf("incorrect jid Node (%s): %s", tt.expected.Node, jid.Node)
}
if jid.username != tt.expected.username {
t.Errorf("incorrect jid domain (%s): %s", tt.expected.domain, jid.domain)
if jid.Node != tt.expected.Node {
t.Errorf("incorrect jid domain (%s): %s", tt.expected.Domain, jid.Domain)
}
if jid.resource != tt.expected.resource {
t.Errorf("incorrect jid resource (%s): %s", tt.expected.resource, jid.resource)
if jid.Resource != tt.expected.Resource {
t.Errorf("incorrect jid resource (%s): %s", tt.expected.Resource, jid.Resource)
}
}
}