Skip to content

Commit

Permalink
Issue 559
Browse files Browse the repository at this point in the history
  • Loading branch information
shamblett committed Aug 12, 2024
1 parent 1261439 commit e25edef
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/mqtt_client_base_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ void main() {
Protocol.version = MqttClientConstants.mqttV31ProtocolVersion;
Protocol.name = MqttClientConstants.mqttV31ProtocolName;
});
test('Protocol with connect message', () {
test('Protocol set with connect message', () {
Protocol.version = MqttClientConstants.mqttV31ProtocolVersion;
Protocol.name = MqttClientConstants.mqttV31ProtocolName;
final client = MqttClient('localhost', 'abcd');
Expand All @@ -541,6 +541,17 @@ void main() {
expect(client.connectionMessage?.variableHeader?.protocolName,
MqttClientConstants.mqttV311ProtocolName);
});
test('Protocol set on connect message', () {
Protocol.version = MqttClientConstants.mqttV31ProtocolVersion;
Protocol.name = MqttClientConstants.mqttV31ProtocolName;
expect(Protocol.version, MqttClientConstants.mqttV31ProtocolVersion);
expect(Protocol.name, MqttClientConstants.mqttV31ProtocolName);
MqttConnectMessage()
..withProtocolName(MqttClientConstants.mqttV311ProtocolName)
..withProtocolVersion(MqttClientConstants.mqttV311ProtocolVersion);
expect(Protocol.version, MqttClientConstants.mqttV311ProtocolVersion);
expect(Protocol.name, MqttClientConstants.mqttV311ProtocolName);
});
test('Byte Buffer', () {
final uBuff = typed.Uint8Buffer(10);
final uBuff1 = typed.Uint8Buffer(10);
Expand Down

0 comments on commit e25edef

Please sign in to comment.