diff --git a/tst/DtlsApiTest.cpp b/tst/DtlsApiTest.cpp index 4fb2bb512c..6ee5216fac 100644 --- a/tst/DtlsApiTest.cpp +++ b/tst/DtlsApiTest.cpp @@ -26,10 +26,17 @@ TEST_F(DtlsApiTest, createCertificateAndKey_Returns_Success) TEST_F(DtlsApiTest, dtlsSessionIsInitFinished_Null_Check) { - PDtlsSession pClient = NULL; - BOOL isDtlsConnected = FALSE; - EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, &isDtlsConnected)); - EXPECT_EQ(FALSE, isDtlsConnected); + PDtlsSession pClient = NULL; + DtlsSessionCallbacks callbacks; + TIMER_QUEUE_HANDLE timerQueueHandle = INVALID_TIMER_QUEUE_HANDLE_VALUE; + EXPECT_EQ(STATUS_SUCCESS, timerQueueCreate(&timerQueueHandle)); + EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, NULL)); + EXPECT_EQ(STATUS_SUCCESS, createDtlsSession(&callbacks, timerQueueHandle, 0, FALSE, NULL, &pClient)); + EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, NULL)); + freeDtlsSession(&pClient); + EXPECT_EQ(NULL, pClient); + timerQueueFree(&timerQueueHandle); + } TEST_F(DtlsApiTest, dtlsSessionCreated_RefCount)