diff --git a/packages/moxxmpp/lib/src/message.dart b/packages/moxxmpp/lib/src/message.dart index 4209598..860049c 100644 --- a/packages/moxxmpp/lib/src/message.dart +++ b/packages/moxxmpp/lib/src/message.dart @@ -66,7 +66,7 @@ class MessageManager extends XmppManagerBase { stanzaTag: 'message', callback: _onMessage, priority: messageHandlerPriority, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/presence.dart b/packages/moxxmpp/lib/src/presence.dart index d850f24..cd39383 100644 --- a/packages/moxxmpp/lib/src/presence.dart +++ b/packages/moxxmpp/lib/src/presence.dart @@ -66,7 +66,7 @@ class PresenceManager extends XmppManagerBase { stanzaTag: 'presence', callback: _onPresence, priority: presenceHandlerPriority, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/roster/roster.dart b/packages/moxxmpp/lib/src/roster/roster.dart index 61fa837..7a51efc 100644 --- a/packages/moxxmpp/lib/src/roster/roster.dart +++ b/packages/moxxmpp/lib/src/roster/roster.dart @@ -122,7 +122,7 @@ class RosterManager extends XmppManagerBase { tagName: 'query', tagXmlns: rosterXmlns, callback: _onRosterPush, - ) + ), ]; @override @@ -277,7 +277,7 @@ class RosterManager extends XmppManagerBase { attributes: { 'ver': await _stateManager.getRosterVersion() ?? '', }, - ) + ), ], ), ), @@ -319,14 +319,12 @@ class RosterManager extends XmppManagerBase { tag: 'item', attributes: { 'jid': jid, - ...title == jid.split('@')[0] - ? {} - : {'name': title} + if (title == jid.split('@')[0]) 'name': title, }, children: (groups ?? []) .map((group) => XMLNode(tag: 'group', text: group)) .toList(), - ) + ), ], ), ], @@ -357,13 +355,13 @@ class RosterManager extends XmppManagerBase { children: [ XMLNode( tag: 'item', - attributes: { + attributes: { 'jid': jid, - 'subscription': 'remove' + 'subscription': 'remove', }, - ) + ), ], - ) + ), ], ), ), diff --git a/packages/moxxmpp/lib/src/stanza.dart b/packages/moxxmpp/lib/src/stanza.dart index 8439c27..561eef4 100644 --- a/packages/moxxmpp/lib/src/stanza.dart +++ b/packages/moxxmpp/lib/src/stanza.dart @@ -248,15 +248,14 @@ XMLNode buildErrorElement(String type, String condition, {String? text}) { XMLNode.xmlns( tag: condition, xmlns: fullStanzaXmlns, - children: text != null - ? [ - XMLNode.xmlns( - tag: 'text', - xmlns: fullStanzaXmlns, - text: text, - ) - ] - : [], + children: [ + if (text != null) + XMLNode.xmlns( + tag: 'text', + xmlns: fullStanzaXmlns, + text: text, + ), + ], ), ], ); diff --git a/packages/moxxmpp/lib/src/xeps/xep_0004.dart b/packages/moxxmpp/lib/src/xeps/xep_0004.dart index 7b4a684..37db5c2 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0004.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0004.dart @@ -10,14 +10,14 @@ class DataFormOption { XMLNode toXml() { return XMLNode( tag: 'option', - attributes: label != null - ? {'label': label} - : {}, + attributes: { + if (label != null) 'label': label, + }, children: [ XMLNode( tag: 'value', text: value, - ) + ), ], ); } @@ -45,19 +45,22 @@ class DataFormField { return XMLNode( tag: 'field', attributes: { - ...varAttr != null - ? {'var': varAttr} - : {}, - ...type != null ? {'type': type} : {}, - ...label != null - ? {'label': label} - : {} + if (varAttr != null) 'var': varAttr, + if (type != null) 'type': type, + if (label != null) 'label': label, }, children: [ - ...description != null ? [XMLNode(tag: 'desc', text: description)] : [], - ...isRequired ? [XMLNode(tag: 'required')] : [], + if (description != null) + XMLNode( + tag: 'desc', + text: description, + ), + if (isRequired) + XMLNode( + tag: 'required', + ), ...values.map((value) => XMLNode(tag: 'value', text: value)), - ...options.map((option) => option.toXml()) + ...options.map((option) => option.toXml()), ], ); } diff --git a/packages/moxxmpp/lib/src/xeps/xep_0030/helpers.dart b/packages/moxxmpp/lib/src/xeps/xep_0030/helpers.dart index 9ec65aa..79d2fe4 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0030/helpers.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0030/helpers.dart @@ -13,8 +13,10 @@ Stanza buildDiscoInfoQueryStanza(JID entity, String? node) { XMLNode.xmlns( tag: 'query', xmlns: discoInfoXmlns, - attributes: node != null ? {'node': node} : {}, - ) + attributes: { + if (node != null) 'node': node, + }, + ), ], ); } @@ -27,8 +29,10 @@ Stanza buildDiscoItemsQueryStanza(JID entity, {String? node}) { XMLNode.xmlns( tag: 'query', xmlns: discoItemsXmlns, - attributes: node != null ? {'node': node} : {}, - ) + attributes: { + if (node != null) 'node': node, + }, + ), ], ); } diff --git a/packages/moxxmpp/lib/src/xeps/xep_0030/types.dart b/packages/moxxmpp/lib/src/xeps/xep_0030/types.dart index 18c3d34..d2cfa04 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0030/types.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0030/types.dart @@ -19,13 +19,11 @@ class Identity { XMLNode toXMLNode() { return XMLNode( tag: 'identity', - attributes: { + attributes: { 'category': category, 'type': type, 'name': name, - ...lang == null - ? {} - : {'xml:lang': lang} + if (lang != null) 'xml:lang': lang, }, ); } diff --git a/packages/moxxmpp/lib/src/xeps/xep_0054.dart b/packages/moxxmpp/lib/src/xeps/xep_0054.dart index 90c76e8..d3d8778 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0054.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0054.dart @@ -38,7 +38,7 @@ class VCardManager extends XmppManagerBase { tagName: 'x', tagXmlns: vCardTempUpdate, callback: _onPresence, - ) + ), ]; @override @@ -108,7 +108,7 @@ class VCardManager extends XmppManagerBase { XMLNode.xmlns( tag: 'vCard', xmlns: vCardTempXmlns, - ) + ), ], ), encrypted: true, diff --git a/packages/moxxmpp/lib/src/xeps/xep_0060/xep_0060.dart b/packages/moxxmpp/lib/src/xeps/xep_0060/xep_0060.dart index bb9f94c..e6ecbf6 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0060/xep_0060.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0060/xep_0060.dart @@ -38,26 +38,20 @@ class PubSubPublishOptions { varAttr: 'FORM_TYPE', type: 'hidden', ), - ...accessModel != null - ? [ - DataFormField( - options: [], - isRequired: false, - values: [accessModel!], - varAttr: 'pubsub#access_model', - ) - ] - : [], - ...maxItems != null - ? [ - DataFormField( - options: [], - isRequired: false, - values: [maxItems!], - varAttr: 'pubsub#max_items', - ), - ] - : [], + if (accessModel != null) + DataFormField( + options: [], + isRequired: false, + values: [accessModel!], + varAttr: 'pubsub#access_model', + ), + if (maxItems != null) + DataFormField( + options: [], + isRequired: false, + values: [maxItems!], + varAttr: 'pubsub#max_items', + ), ], ).toXml(); } @@ -87,7 +81,7 @@ class PubSubManager extends XmppManagerBase { tagName: 'event', tagXmlns: pubsubEventXmlns, callback: _onPubsubMessage, - ) + ), ]; @override @@ -314,11 +308,11 @@ class PubSubManager extends XmppManagerBase { children: [ XMLNode( tag: 'item', - attributes: id != null - ? {'id': id} - : {}, + attributes: { + if (id != null) 'id': id, + }, children: [payload], - ) + ), ], ), if (pubOptions != null) @@ -327,7 +321,7 @@ class PubSubManager extends XmppManagerBase { children: [pubOptions.toXml()], ), ], - ) + ), ], ), shouldEncrypt: false, @@ -422,7 +416,7 @@ class PubSubManager extends XmppManagerBase { }, ), ], - ) + ), ], ), shouldEncrypt: false, diff --git a/packages/moxxmpp/lib/src/xeps/xep_0066.dart b/packages/moxxmpp/lib/src/xeps/xep_0066.dart index f69ea06..ab5c472 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0066.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0066.dart @@ -45,7 +45,7 @@ class OOBManager extends XmppManagerBase { callback: _onMessage, // Before the message manager priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0085.dart b/packages/moxxmpp/lib/src/xeps/xep_0085.dart index 36a5f2a..b24da84 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0085.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0085.dart @@ -69,7 +69,7 @@ class ChatStateManager extends XmppManagerBase { callback: _onChatStateReceived, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0184.dart b/packages/moxxmpp/lib/src/xeps/xep_0184.dart index 9bf4cc6..1f132e7 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0184.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0184.dart @@ -66,7 +66,7 @@ class MessageDeliveryReceiptManager extends XmppManagerBase { callback: _onDeliveryRequestReceived, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0191.dart b/packages/moxxmpp/lib/src/xeps/xep_0191.dart index dcb3395..83553e4 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0191.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0191.dart @@ -27,7 +27,7 @@ class BlockingManager extends XmppManagerBase { tagName: 'block', tagXmlns: blockingXmlns, callback: _blockPush, - ) + ), ]; @override @@ -107,10 +107,12 @@ class BlockingManager extends XmppManagerBase { children: items.map((item) { return XMLNode( tag: 'item', - attributes: {'jid': item}, + attributes: { + 'jid': item, + }, ); }).toList(), - ) + ), ], ), ), @@ -128,7 +130,7 @@ class BlockingManager extends XmppManagerBase { XMLNode.xmlns( tag: 'unblock', xmlns: blockingXmlns, - ) + ), ], ), ), @@ -152,11 +154,13 @@ class BlockingManager extends XmppManagerBase { .map( (item) => XMLNode( tag: 'item', - attributes: {'jid': item}, + attributes: { + 'jid': item, + }, ), ) .toList(), - ) + ), ], ), ), @@ -174,7 +178,7 @@ class BlockingManager extends XmppManagerBase { XMLNode.xmlns( tag: 'blocklist', xmlns: blockingXmlns, - ) + ), ], ), ), diff --git a/packages/moxxmpp/lib/src/xeps/xep_0198/nonzas.dart b/packages/moxxmpp/lib/src/xeps/xep_0198/nonzas.dart index fda84a1..e5450cf 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0198/nonzas.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0198/nonzas.dart @@ -5,7 +5,10 @@ class StreamManagementEnableNonza extends XMLNode { StreamManagementEnableNonza() : super( tag: 'enable', - attributes: {'xmlns': smXmlns, 'resume': 'true'}, + attributes: { + 'xmlns': smXmlns, + 'resume': 'true', + }, ); } @@ -13,10 +16,10 @@ class StreamManagementResumeNonza extends XMLNode { StreamManagementResumeNonza(String id, int h) : super( tag: 'resume', - attributes: { + attributes: { 'xmlns': smXmlns, 'previd': id, - 'h': h.toString() + 'h': h.toString(), }, ); } @@ -25,7 +28,10 @@ class StreamManagementAckNonza extends XMLNode { StreamManagementAckNonza(int h) : super( tag: 'a', - attributes: {'xmlns': smXmlns, 'h': h.toString()}, + attributes: { + 'xmlns': smXmlns, + 'h': h.toString(), + }, ); } @@ -33,7 +39,7 @@ class StreamManagementRequestNonza extends XMLNode { StreamManagementRequestNonza() : super( tag: 'r', - attributes: { + attributes: { 'xmlns': smXmlns, }, ); diff --git a/packages/moxxmpp/lib/src/xeps/xep_0198/xep_0198.dart b/packages/moxxmpp/lib/src/xeps/xep_0198/xep_0198.dart index 9daf2fc..49082d9 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0198/xep_0198.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0198/xep_0198.dart @@ -140,7 +140,7 @@ class StreamManagementManager extends XmppManagerBase { nonzaTag: 'a', nonzaXmlns: smXmlns, callback: _handleAckResponse, - ) + ), ]; @override @@ -148,14 +148,14 @@ class StreamManagementManager extends XmppManagerBase { StanzaHandler( callback: _onServerStanzaReceived, priority: 9999, - ) + ), ]; @override List getOutgoingPostStanzaHandlers() => [ StanzaHandler( callback: _onClientStanzaSent, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0280.dart b/packages/moxxmpp/lib/src/xeps/xep_0280.dart index ddddc72..3ecd240 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0280.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0280.dart @@ -49,7 +49,7 @@ class CarbonsManager extends XmppManagerBase { tagXmlns: carbonsXmlns, callback: _onMessageSent, priority: -98, - ) + ), ]; @override @@ -124,7 +124,7 @@ class CarbonsManager extends XmppManagerBase { XMLNode.xmlns( tag: 'enable', xmlns: carbonsXmlns, - ) + ), ], ), ), @@ -154,7 +154,7 @@ class CarbonsManager extends XmppManagerBase { XMLNode.xmlns( tag: 'disable', xmlns: carbonsXmlns, - ) + ), ], ), ), diff --git a/packages/moxxmpp/lib/src/xeps/xep_0308.dart b/packages/moxxmpp/lib/src/xeps/xep_0308.dart index 4871219..965392c 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0308.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0308.dart @@ -40,7 +40,7 @@ class LastMessageCorrectionManager extends XmppManagerBase { callback: _onMessage, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0333.dart b/packages/moxxmpp/lib/src/xeps/xep_0333.dart index 8a7adbb..4da4dbb 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0333.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0333.dart @@ -100,7 +100,7 @@ class ChatMarkerManager extends XmppManagerBase { callback: _onMessage, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0359.dart b/packages/moxxmpp/lib/src/xeps/xep_0359.dart index 24108cc..d150524 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0359.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0359.dart @@ -81,7 +81,7 @@ class StableIdManager extends XmppManagerBase { callback: _onMessage, // Before the MessageManager priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0363/xep_0363.dart b/packages/moxxmpp/lib/src/xeps/xep_0363/xep_0363.dart index 7b7507e..611e3fc 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0363/xep_0363.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0363/xep_0363.dart @@ -161,9 +161,9 @@ class HttpFileUploadManager extends XmppManagerBase { attributes: { 'filename': filename, 'size': filesize.toString(), - ...contentType != null ? {'content-type': contentType} : {} + if (contentType != null) 'content-type': contentType, }, - ) + ), ], ), ), diff --git a/packages/moxxmpp/lib/src/xeps/xep_0385.dart b/packages/moxxmpp/lib/src/xeps/xep_0385.dart index 1f6881c..1005d1b 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0385.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0385.dart @@ -82,7 +82,7 @@ class SIMSManager extends XmppManagerBase { tagXmlns: referenceXmlns, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0424.dart b/packages/moxxmpp/lib/src/xeps/xep_0424.dart index 859d84b..1f0e4c6 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0424.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0424.dart @@ -31,7 +31,7 @@ class MessageRetractionManager extends XmppManagerBase { callback: _onMessage, // Before the MessageManager priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0447.dart b/packages/moxxmpp/lib/src/xeps/xep_0447.dart index d29ce5d..c0b6ed9 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0447.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0447.dart @@ -133,7 +133,7 @@ class SFSManager extends XmppManagerBase { callback: _onMessage, // Before the message handler priority: -98, - ) + ), ]; @override diff --git a/packages/moxxmpp/lib/src/xeps/xep_0461.dart b/packages/moxxmpp/lib/src/xeps/xep_0461.dart index 989e3a1..ebe5c4e 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0461.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0461.dart @@ -96,7 +96,7 @@ class MessageRepliesManager extends XmppManagerBase { callback: _onMessage, // Before the message handler priority: -99, - ) + ), ]; @override diff --git a/packages/moxxmpp/test/sasl/scram_test.dart b/packages/moxxmpp/test/sasl/scram_test.dart index 3e64e3c..6c4817e 100644 --- a/packages/moxxmpp/test/sasl/scram_test.dart +++ b/packages/moxxmpp/test/sasl/scram_test.dart @@ -14,9 +14,9 @@ final scramSha1StreamFeatures = XMLNode( XMLNode( tag: 'mechanism', text: 'SCRAM-SHA-1', - ) + ), ], - ) + ), ], ); final scramSha256StreamFeatures = XMLNode( @@ -29,9 +29,9 @@ final scramSha256StreamFeatures = XMLNode( XMLNode( tag: 'mechanism', text: 'SCRAM-SHA-256', - ) + ), ], - ) + ), ], ); diff --git a/packages/moxxmpp/test/stanzahandler_test.dart b/packages/moxxmpp/test/stanzahandler_test.dart index cb62eee..66ac912 100644 --- a/packages/moxxmpp/test/stanzahandler_test.dart +++ b/packages/moxxmpp/test/stanzahandler_test.dart @@ -171,7 +171,7 @@ void main() { ), tagName: '3', priority: 50, - ) + ), ]..sort(stanzaHandlerSortComparator); expect(handlerList[0].tagName, '1'); diff --git a/packages/moxxmpp/test/xeps/xep_0060_test.dart b/packages/moxxmpp/test/xeps/xep_0060_test.dart index 0aaf10b..2f356c3 100644 --- a/packages/moxxmpp/test/xeps/xep_0060_test.dart +++ b/packages/moxxmpp/test/xeps/xep_0060_test.dart @@ -158,7 +158,7 @@ void main() { ''', ignoreId: true, adjustId: true, - ) + ), ], ); diff --git a/packages/moxxmpp/test/xeps/xep_0115_test.dart b/packages/moxxmpp/test/xeps/xep_0115_test.dart index 46c073b..47837c8 100644 --- a/packages/moxxmpp/test/xeps/xep_0115_test.dart +++ b/packages/moxxmpp/test/xeps/xep_0115_test.dart @@ -69,7 +69,7 @@ class StubbedDiscoManager extends DiscoManager { isRequired: false, varAttr: 'FORM_TYPE', type: 'hidden', - ) + ), ], reported: [], items: [], @@ -153,14 +153,14 @@ void main() { 'http://jabber.org/protocol/caps', 'http://jabber.org/protocol/disco#info', 'http://jabber.org/protocol/disco#items', - 'http://jabber.org/protocol/muc' + 'http://jabber.org/protocol/muc', ], const [ Identity( category: 'client', type: 'pc', name: 'Exodus 0.9.1', - ) + ), ], const [], null, @@ -179,7 +179,7 @@ void main() { 'http://jabber.org/protocol/caps', 'http://jabber.org/protocol/disco#info', 'http://jabber.org/protocol/disco#items', - 'http://jabber.org/protocol/muc' + 'http://jabber.org/protocol/muc', ], const [ Identity( @@ -295,14 +295,14 @@ void main() { 'urn:xmpp:message-correct:0', 'urn:xmpp:ping', 'urn:xmpp:receipts', - 'urn:xmpp:time' + 'urn:xmpp:time', ], const [ Identity( category: 'client', type: 'phone', name: 'Conversations', - ) + ), ], const [], null, diff --git a/packages/moxxmpp/test/xeps/xep_0198_test.dart b/packages/moxxmpp/test/xeps/xep_0198_test.dart index 146f803..6469157 100644 --- a/packages/moxxmpp/test/xeps/xep_0198_test.dart +++ b/packages/moxxmpp/test/xeps/xep_0198_test.dart @@ -433,10 +433,11 @@ void main() { }); test('Test a failed stream resumption', () async { - final fakeSocket = StubTCPSocket([ - StringExpectation( - "", - ''' + final fakeSocket = StubTCPSocket( + [ + StringExpectation( + "", + ''' PLAIN ''', - ), - StringExpectation( - "AHBvbHlub21kaXZpc2lvbgBhYWFh", - '', - ), - StringExpectation( - "", - ''' + ), + StringExpectation( + "AHBvbHlub21kaXZpc2lvbgBhYWFh", + '', + ), + StringExpectation( + "", + ''' ''', - ), - StringExpectation( - "", - "", - ), - StanzaExpectation( - '', - 'polynomdivision@test.server/MU29eEZn', - ignoreId: true, - ), - StringExpectation( - "", - '', - ) - ]); + ), + StringExpectation( + "", + "", + ), + StanzaExpectation( + '', + 'polynomdivision@test.server/MU29eEZn', + ignoreId: true, + ), + StringExpectation( + "", + '', + ), + ], + ); final conn = XmppConnection( TestingReconnectionPolicy(), diff --git a/packages/moxxmpp/test/xeps/xep_0334_test.dart b/packages/moxxmpp/test/xeps/xep_0334_test.dart index 3bb1a04..b6bc06e 100644 --- a/packages/moxxmpp/test/xeps/xep_0334_test.dart +++ b/packages/moxxmpp/test/xeps/xep_0334_test.dart @@ -115,17 +115,19 @@ void main() { test('Test sending a message processing hint', () async { final manager = MessageManager(); final holder = TestingManagerHolder( - stubSocket: StubTCPSocket([ - StanzaExpectation( - ''' + stubSocket: StubTCPSocket( + [ + StanzaExpectation( + ''' ''', - '', - ) - ]), + '', + ), + ], + ), ); await holder.register([ diff --git a/packages/moxxmpp/test/xeps/xep_0363_test.dart b/packages/moxxmpp/test/xeps/xep_0363_test.dart index f5b23da..5861882 100644 --- a/packages/moxxmpp/test/xeps/xep_0363_test.dart +++ b/packages/moxxmpp/test/xeps/xep_0363_test.dart @@ -6,7 +6,7 @@ void main() { test('invariance', () { final headers = { 'authorization': 'Basic Base64String==', - 'cookie': 'foo=bar; user=romeo' + 'cookie': 'foo=bar; user=romeo', }; expect( prepareHeaders(headers), @@ -16,7 +16,7 @@ void main() { test('invariance through uppercase', () { final headers = { 'Authorization': 'Basic Base64String==', - 'Cookie': 'foo=bar; user=romeo' + 'Cookie': 'foo=bar; user=romeo', }; expect( prepareHeaders(headers), @@ -27,7 +27,7 @@ void main() { final headers = { 'Authorization': 'Basic Base64String==', 'Cookie': 'foo=bar; user=romeo', - 'X-Tracking': 'Base64String==' + 'X-Tracking': 'Base64String==', }; expect(prepareHeaders(headers), { 'Authorization': 'Basic Base64String==',