Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
test_SystemManager.cpp File Reference

Unit tests for the SystemManager class. More...

#include <QSignalSpy>
#include "MockBatteryController.hpp"
#include "MockSystemInfoProvider.hpp"
#include "SystemManager.hpp"
#include <gmock/gmock.h>
#include <gtest/gtest.h>

Go to the source code of this file.

Data Structures

class  SystemManagerTest
 Class to test the integration between the SystemManager and the BatteryController, SystemInfoProvider, and SystemCommandExecutor. More...
 

Functions

 TEST_F (SystemManagerTest, UpdateTime_EmitsCorrectSignal)
 Ensures that the time is correctly updated.
 
 TEST_F (SystemManagerTest, UpdateSystemStatus_EmitsWifiStatus)
 Ensures that the system status is correctly updated.
 
 TEST_F (SystemManagerTest, UpdateSystemStatus_EmitsTemperature)
 Ensures that the system status is correctly updated.
 
 TEST_F (SystemManagerTest, UpdateSystemStatus_EmitsBatteryPercentage)
 Ensures that the system status is correctly updated.
 
 TEST_F (SystemManagerTest, UpdateSystemStatus_EmitsIpAddress)
 Ensures that the system status is correctly updated.
 

Detailed Description

Unit tests for the SystemManager class.

Version
0.1
Date
2025-02-12

This file contains unit tests for the SystemManager class, using Google Test and Google Mock frameworks.

Author
Félix LE BIHAN (@Fle-bihh)
Tiago Pereira (@t-pereira06)
Ricardo Melo (@reomelo)
Michel Batista (@MicchelFAB)

Definition in file test_SystemManager.cpp.

Function Documentation

◆ TEST_F() [1/5]

TEST_F ( SystemManagerTest ,
UpdateSystemStatus_EmitsBatteryPercentage  )

Ensures that the system status is correctly updated.

Test
Tests if the system status is correctly updated.

This test verifies that the system status is correctly updated.

See also
SystemManager::updateSystemStatus

Definition at line 125 of file test_SystemManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [2/5]

TEST_F ( SystemManagerTest ,
UpdateSystemStatus_EmitsIpAddress  )

Ensures that the system status is correctly updated.

Test
Tests if the system status is correctly updated.

This test verifies that the system status is correctly updated.

See also
SystemManager::updateSystemStatus

Definition at line 145 of file test_SystemManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [3/5]

TEST_F ( SystemManagerTest ,
UpdateSystemStatus_EmitsTemperature  )

Ensures that the system status is correctly updated.

Test
Tests if the system status is correctly updated.

This test verifies that the system status is correctly updated.

See also
SystemManager::updateSystemStatus

Definition at line 105 of file test_SystemManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [4/5]

TEST_F ( SystemManagerTest ,
UpdateSystemStatus_EmitsWifiStatus  )

Ensures that the system status is correctly updated.

Test
Tests if the system status is correctly updated.

This test verifies that the system status is correctly updated.

See also
SystemManager::updateSystemStatus

Definition at line 78 of file test_SystemManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [5/5]

TEST_F ( SystemManagerTest ,
UpdateTime_EmitsCorrectSignal  )

Ensures that the time is correctly updated.

Test
Tests if the time is correctly updated.

This test verifies that the time is correctly updated.

See also
SystemManager::updateTime

Definition at line 57 of file test_SystemManager.cpp.

Here is the call graph for this function: