From 41f477215fa54d6db31499eb3b2dc3dc539503c1 Mon Sep 17 00:00:00 2001 From: Kamil Baczkowicz Date: Sat, 24 Mar 2018 23:06:47 +0000 Subject: [PATCH] Unit test fix for not publishing connection state on creation. --- .../baczkowicz/mqttspy/connectivity/MqttConnectionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mqtt-spy/src/test/java/pl/baczkowicz/mqttspy/connectivity/MqttConnectionTest.java b/mqtt-spy/src/test/java/pl/baczkowicz/mqttspy/connectivity/MqttConnectionTest.java index 187c2789..781812be 100644 --- a/mqtt-spy/src/test/java/pl/baczkowicz/mqttspy/connectivity/MqttConnectionTest.java +++ b/mqtt-spy/src/test/java/pl/baczkowicz/mqttspy/connectivity/MqttConnectionTest.java @@ -107,7 +107,7 @@ public void testUnsubscribeAndRemove() throws MqttException, ConfigurationExcept context.checking(new Expectations() { { - oneOf(mockEventBus).publish(with(any(ConnectionStatusChangeEvent.class))); + exactly(0).of(mockEventBus).publish(with(any(ConnectionStatusChangeEvent.class))); } }); @@ -174,7 +174,7 @@ public void testUnsubscribe() throws MqttException, ConfigurationException context.checking(new Expectations() { { - oneOf(mockEventBus).publish(with(any(ConnectionStatusChangeEvent.class))); + exactly(0).of(mockEventBus).publish(with(any(ConnectionStatusChangeEvent.class))); } });