test: Fix linter issues

This commit is contained in:
PapaTutuWawa 2022-07-16 12:43:21 +02:00
parent 49b8e57ba5
commit 260d338240
4 changed files with 13 additions and 10 deletions

View File

@ -42,11 +42,11 @@ XmppManagerAttributes mkAttributes(void Function(Stanza) callback) {
useDirectTLS: true,
allowPlainAuth: false,
),
isStreamFeatureSupported: (feat) => false,
isFeatureSupported: (_) => false,
getFullJID: () => JID.fromString("hallo@example.server/uwu"),
getSocket: () => StubTCPSocket(play: []),
getConnection: () => XmppConnection(TestingReconnectionPolicy())
getConnection: () => XmppConnection(TestingReconnectionPolicy()),
getNegotiatorById: (id) => null,
);
}

View File

@ -28,11 +28,11 @@ void main() {
useDirectTLS: true,
allowPlainAuth: false,
),
isStreamFeatureSupported: (feat) => false,
isFeatureSupported: (_) => false,
getFullJID: () => JID.fromString("bob@xmpp.example/uwu"),
getSocket: () => StubTCPSocket(play: []),
getConnection: () => XmppConnection(TestingReconnectionPolicy())
getConnection: () => XmppConnection(TestingReconnectionPolicy()),
getNegotiatorById: (id) => null,
);
final manager = CarbonsManager();
manager.register(attributes);

View File

@ -30,11 +30,12 @@ void main() {
allowPlainAuth: false,
),
getManagerById: (_) => null,
isStreamFeatureSupported: (_) => false,
isFeatureSupported: (_) => false,
getFullJID: () => JID.fromString("some.user@example.server/aaaaa"),
getSocket: () => StubTCPSocket(play: []),
getConnection: () => XmppConnection(TestingReconnectionPolicy())
getConnection: () => XmppConnection(TestingReconnectionPolicy()),
// TODO:
getNegotiatorById: (id) => null,
)
);
@ -59,11 +60,12 @@ void main() {
allowPlainAuth: false,
),
getManagerById: (_) => null,
isStreamFeatureSupported: (xmlns) => xmlns == csiXmlns,
isFeatureSupported: (_) => false,
getFullJID: () => JID.fromString("some.user@example.server/aaaaa"),
getSocket: () => StubTCPSocket(play: []),
getConnection: () => XmppConnection(TestingReconnectionPolicy())
getConnection: () => XmppConnection(TestingReconnectionPolicy()),
// TODO
getNegotiatorById: (id) => null,
));
csi.setActive();

View File

@ -40,11 +40,12 @@ Future<bool> testRosterManager(String bareJid, String resource, String stanzaStr
allowPlainAuth: false,
),
getManagerById: (_) => null,
isStreamFeatureSupported: (_) => false,
isFeatureSupported: (_) => false,
getFullJID: () => JID.fromString("$bareJid/$resource"),
getSocket: () => StubTCPSocket(play: []),
getConnection: () => XmppConnection(TestingReconnectionPolicy())
getConnection: () => XmppConnection(TestingReconnectionPolicy()),
// TODO
getNegotiatorById: (id) => null,
));
final stanza = Stanza.fromXMLNode(XMLNode.fromString(stanzaString));