Skip to content

Commit

Permalink
Rename some things and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrowlands committed Dec 20, 2023
1 parent 7221f4c commit a9bc9b4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ '*' ]

jobs:
generate:
test:
runs-on: ubuntu-latest
steps:
#"standard step" where repo needs to be checked-out first
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: NS Messaging library Release and AsyncAPI documents processing
name: Build and Publish Release Artifacts

on:
push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void validateTlsEnableMqttConnectionUri()
final String username = "bob";
final String password = "bob's password";

final BrokerConnectionInfo mqttBrokerConnectionInfo = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password);
final BrokerConnectionInfo mqttBrokerConnectionInfo = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password, "");

assertEquals(host, mqttBrokerConnectionInfo.getMqttBrokerHost());
assertEquals(port, mqttBrokerConnectionInfo.getPortNumber());
Expand All @@ -44,7 +44,7 @@ public void validatePlaintextMqttConnectionUri()
final String username = "bob";
final String password = "bob's password";

final BrokerConnectionInfo mqttBrokerConnectionInfo = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password);
final BrokerConnectionInfo mqttBrokerConnectionInfo = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password, "");

assertEquals(host, mqttBrokerConnectionInfo.getMqttBrokerHost());
assertEquals(port, mqttBrokerConnectionInfo.getPortNumber());
Expand All @@ -64,8 +64,8 @@ public void validateMqttConnectionInfoEquals_correct()
final String username = "bob";
final String password = "bob's password";

final BrokerConnectionInfo mqttBrokerConnectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password);
final BrokerConnectionInfo mqttBrokerConnectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password);
final BrokerConnectionInfo mqttBrokerConnectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password, "");
final BrokerConnectionInfo mqttBrokerConnectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, password, "");

assertEquals(mqttBrokerConnectionInfo1, mqttBrokerConnectionInfo2);
}
Expand All @@ -80,28 +80,28 @@ public void validateMqttConnectionInfoEquals_invalid()
final String username = "bob";
final String password = "bob's password";

BrokerConnectionInfo connectionInfo1 = new BrokerConnectionInfo("mqtt.example.com", port, tlsEnabled, clientId, username, password);
BrokerConnectionInfo connectionInfo2 = new BrokerConnectionInfo("craxiom.com", port, tlsEnabled, clientId, username, password);
BrokerConnectionInfo connectionInfo1 = new BrokerConnectionInfo("mqtt.example.com", port, tlsEnabled, clientId, username, password, "");
BrokerConnectionInfo connectionInfo2 = new BrokerConnectionInfo("craxiom.com", port, tlsEnabled, clientId, username, password, "");
assertNotEquals(connectionInfo1, connectionInfo2);

connectionInfo1 = new BrokerConnectionInfo(host, 123, tlsEnabled, clientId, username, password);
connectionInfo2 = new BrokerConnectionInfo(host, 1234, tlsEnabled, clientId, username, password);
connectionInfo1 = new BrokerConnectionInfo(host, 123, tlsEnabled, clientId, username, password, "");
connectionInfo2 = new BrokerConnectionInfo(host, 1234, tlsEnabled, clientId, username, password, "");
assertNotEquals(connectionInfo1, connectionInfo2);

connectionInfo1 = new BrokerConnectionInfo(host, port, true, clientId, username, password);
connectionInfo2 = new BrokerConnectionInfo(host, port, false, clientId, username, password);
connectionInfo1 = new BrokerConnectionInfo(host, port, true, clientId, username, password, "");
connectionInfo2 = new BrokerConnectionInfo(host, port, false, clientId, username, password, "");
assertNotEquals(connectionInfo1, connectionInfo2);

connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, "Pixel4", username, password);
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, "S20", username, password);
connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, "Pixel4", username, password, "");
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, "S20", username, password, "");
assertNotEquals(connectionInfo1, connectionInfo2);

connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, "john", password);
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, "steve", password);
connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, "john", password, "");
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, "steve", password, "");
assertNotEquals(connectionInfo1, connectionInfo2);

connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, "bob's password");
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, "bob's burgers");
connectionInfo1 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, "bob's password", "");
connectionInfo2 = new BrokerConnectionInfo(host, port, tlsEnabled, clientId, username, "bob's burgers", "");
assertNotEquals(connectionInfo1, connectionInfo2);
}
}

0 comments on commit a9bc9b4

Please sign in to comment.