[Test] negative case to set mqtt event accepted/tizen/unified/20230628.023658
authorJaeyun Jung <jy1210.jung@samsung.com>
Tue, 13 Jun 2023 09:38:21 +0000 (18:38 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 14 Jun 2023 11:58:13 +0000 (20:58 +0900)
Add negative test of set-event in mqtt impl.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
tests/unittest_nnstreamer-edge-mqtt.cc

index 3f09fb26a2bdcb8f01215e047139430a818a3351..7a5e65f5b0bc4f3da35969c7cda42e3c77a45ce7 100644 (file)
@@ -703,6 +703,20 @@ TEST(edgeMqtt, checkConnectionInvalidParam_n)
   EXPECT_NE (ret, true);
 }
 
+/**
+ * @brief Set event callback with invalid param.
+ */
+TEST(edgeMqtt, setEventCallbackInvalidParam_n)
+{
+  int ret = -1;
+
+  if (!_check_mqtt_broker ())
+    return;
+
+  ret = nns_edge_mqtt_set_event_callback (NULL, NULL, NULL);
+  EXPECT_NE (ret, NNS_EDGE_ERROR_NONE);
+}
+
 /**
  * @brief Main gtest
  */