/**
 * @file UDPStreamerClientGTest.cpp
 * @brief Source file for class UDPStreamerClientGTest
 * @date 01/07/2026
 * @author Martino Ferrari
 *
 * @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and
 * the Development of Fusion Energy ('Fusion for Energy').
 * Licensed under the EUPL, Version 1.1 or - as soon they will be approved
 * by the European Commission - subsequent versions of the EUPL (the "Licence")
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
 *
 * @warning Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS"
 * basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the Licence permissions and limitations under the Licence.
 *
 * @details This source file contains the GTest wrapper for all UDPStreamerClient tests.
 */

#define DLL_API

/*---------------------------------------------------------------------------*/
/*                         Standard header includes                          */
/*---------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include <limits.h>

/*---------------------------------------------------------------------------*/
/*                         Project header includes                           */
/*---------------------------------------------------------------------------*/
#include "UDPStreamerClientTest.h"

/*---------------------------------------------------------------------------*/
/*                           Method definitions                              */
/*---------------------------------------------------------------------------*/

TEST(UDPStreamerClientGTest, TestInitialise_Valid) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestInitialise_Valid());
}

TEST(UDPStreamerClientGTest, TestInitialise_DefaultServerAddress) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestInitialise_DefaultServerAddress());
}

TEST(UDPStreamerClientGTest, TestInitialise_DefaultPort) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestInitialise_DefaultPort());
}

TEST(UDPStreamerClientGTest, TestInitialise_MulticastMode_Valid) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestInitialise_MulticastMode_Valid());
}

TEST(UDPStreamerClientGTest, TestInitialise_MulticastMode_DefaultDataPort) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestInitialise_MulticastMode_DefaultDataPort());
}

TEST(UDPStreamerClientGTest, TestSetConfiguredDatabase_MultipleSignals) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestSetConfiguredDatabase_MultipleSignals());
}

TEST(UDPStreamerClientGTest, TestPrepareNextState_StartsReceiver) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestPrepareNextState_StartsReceiver());
}

TEST(UDPStreamerClientGTest, TestSynchronise_NoData) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestSynchronise_NoData());
}

TEST(UDPStreamerClientGTest, TestOnUDPSConfig_BasicAccept) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSConfig_BasicAccept());
}

TEST(UDPStreamerClientGTest, TestOnUDPSConfig_SignalCountMismatch) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSConfig_SignalCountMismatch());
}

TEST(UDPStreamerClientGTest, TestOnUDPSConfig_NameMismatch) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSConfig_NameMismatch());
}

TEST(UDPStreamerClientGTest, TestOnUDPSConfig_ElementCountMismatch) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSConfig_ElementCountMismatch());
}

TEST(UDPStreamerClientGTest, TestOnUDPSConfig_TooSmallPayload) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSConfig_TooSmallPayload());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_QuantizedUint16) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_QuantizedUint16());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_QuantizedInt8) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_QuantizedInt8());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_MultipleSignalsOrder) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_MultipleSignalsOrder());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_AccumulateMode) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_AccumulateMode());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_TooSmallPayload) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_TooSmallPayload());
}

TEST(UDPStreamerClientGTest, TestOnUDPSData_BeforeConfig) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSData_BeforeConfig());
}

TEST(UDPStreamerClientGTest, TestOnUDPSDisconnected_InvalidatesConfig) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestOnUDPSDisconnected_InvalidatesConfig());
}

TEST(UDPStreamerClientGTest, TestExecute_ConnectConfigDataEndToEnd) {
    UDPStreamerClientTest test;
    ASSERT_TRUE(test.TestExecute_ConnectConfigDataEndToEnd());
}
