2024-06-18 08:16:21 -07:00
|
|
|
//
|
|
|
|
// Created by kifir on 6/18/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-11-04 14:09:39 -08:00
|
|
|
#include "test_engine_configuration.h"
|
|
|
|
#include "test_engine_state.h"
|
2024-11-05 08:57:25 -08:00
|
|
|
#include "test_persistent_configuration.h"
|
2024-11-20 11:07:50 -08:00
|
|
|
#include "engine_config.h"
|
2024-06-18 08:16:21 -07:00
|
|
|
|
|
|
|
class TestBase : public testing::Test {
|
|
|
|
protected:
|
2024-10-03 12:42:38 -07:00
|
|
|
void SetUp() override;
|
|
|
|
void TearDown() override;
|
2024-06-18 08:16:21 -07:00
|
|
|
|
2024-11-04 14:09:39 -08:00
|
|
|
TestEngineConfiguration& getTestEngineConfiguration();
|
|
|
|
TestEngineState& getTestEngineState();
|
2024-11-05 08:57:25 -08:00
|
|
|
TestPersistentConfiguration& getTestPersistentConfiguration();
|
2024-11-04 14:09:39 -08:00
|
|
|
|
2024-11-20 11:07:50 -08:00
|
|
|
void setUpEngineConfiguration(const EngineConfig& config);
|
|
|
|
|
2024-06-18 08:16:21 -07:00
|
|
|
void periodicFastCallback();
|
2024-06-18 08:42:16 -07:00
|
|
|
void periodicSlowCallback();
|
2024-10-03 07:26:06 -07:00
|
|
|
|
2024-10-03 12:48:09 -07:00
|
|
|
void updateRpm(float rpm);
|
2024-10-03 13:27:15 -07:00
|
|
|
void updateApp(std::optional<float> app);
|
2024-06-18 08:16:21 -07:00
|
|
|
private:
|
|
|
|
std::unique_ptr<EngineTestHelper> eth;
|
|
|
|
};
|