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

Integration tests for the MileageManager class. More...

#include <QCoreApplication>
#include <QSignalSpy>
#include "MileageCalculator.hpp"
#include "MileageFileHandler.hpp"
#include "MileageManager.hpp"
#include <gtest/gtest.h>

Go to the source code of this file.

Data Structures

class  MileageManagerTest
 Class to test the integration between the MileageManager and the MileageCalculator and MileageFileHandler. More...
 

Functions

 TEST_F (MileageManagerTest, ForwardMileageData)
 Ensures that the MileageManager forwards mileage data.
 
 TEST_F (MileageManagerTest, InitializeMileageManager)
 Ensures that the MileageManager initializes successfully.
 
 TEST_F (MileageManagerTest, UpdateMileageOnSpeedUpdate)
 Ensures that the MileageManager updates the mileage on speed update.
 
 TEST_F (MileageManagerTest, SaveMileage)
 Ensures that the MileageManager saves the mileage.
 
 TEST_F (MileageManagerTest, UpdateTimerInterval)
 Ensures that the MileageManager updates the timer interval.
 
 TEST_F (MileageManagerTest, ShutdownMileageManager)
 Ensures that the MileageManager shuts down successfully.
 

Detailed Description

Integration tests for the MileageManager class.

Version
0.1
Date
2025-02-12
Author
Michel Batista (@MicchelFAB)
FΓ©lix LE BIHAN (@Fle-bihh)
Ricardo Melo (@reomelo)
Tiago Pereira (@t-pereira06)

Definition in file test_int_MileageManager.cpp.

Function Documentation

◆ TEST_F() [1/6]

TEST_F ( MileageManagerTest ,
ForwardMileageData  )

Ensures that the MileageManager forwards mileage data.

Test
πŸ”„ Forward Mileage Data

This test verifies that the MileageManager forwards mileage data by emitting the mileageUpdated signal.

See also
MileageManager::mileageUpdated

Definition at line 71 of file test_int_MileageManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [2/6]

TEST_F ( MileageManagerTest ,
InitializeMileageManager  )

Ensures that the MileageManager initializes successfully.

Test
πŸš— Initialize Mileage Manager

This test verifies that the MileageManager initializes successfully by emitting the mileageUpdated signal.

See also
MileageManager::mileageUpdated

Definition at line 90 of file test_int_MileageManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [3/6]

TEST_F ( MileageManagerTest ,
SaveMileage  )

Ensures that the MileageManager saves the mileage.

Test
πŸ’Ύ Save Mileage

This test verifies that the MileageManager saves the mileage by calling the saveMileage() method.

See also
MileageManager::saveMileage

Definition at line 127 of file test_int_MileageManager.cpp.

◆ TEST_F() [4/6]

TEST_F ( MileageManagerTest ,
ShutdownMileageManager  )

Ensures that the MileageManager shuts down successfully.

Test
⏻ Shutdown Mileage Manager

This test verifies that the MileageManager shuts down successfully by calling the shutdown() method.

See also
MileageManager::shutdown

Definition at line 164 of file test_int_MileageManager.cpp.

◆ TEST_F() [5/6]

TEST_F ( MileageManagerTest ,
UpdateMileageOnSpeedUpdate  )

Ensures that the MileageManager updates the mileage on speed update.

Test
πŸŽοΈπŸ’¨ Update Mileage on Speed Update

This test verifies that the MileageManager updates the mileage on speed update by emitting the mileageUpdated signal.

See also
MileageManager::mileageUpdated

Definition at line 108 of file test_int_MileageManager.cpp.

Here is the call graph for this function:

◆ TEST_F() [6/6]

TEST_F ( MileageManagerTest ,
UpdateTimerInterval  )

Ensures that the MileageManager updates the timer interval.

Test
⏱ Update Timer Interval

This test verifies that the MileageManager updates the timer interval by emitting the mileageUpdated signal.

See also
MileageManager::mileageUpdated

Definition at line 146 of file test_int_MileageManager.cpp.

Here is the call graph for this function: