Commit 9db569a9 authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Moving MockCIEnvironment class into its own header.

parent f5a53c51
......@@ -9,11 +9,11 @@ before_script:
- dnf install -y git
- git clone https://github.com/google/googletest.git
- mkdir googletest/build
- pushd googletest/build
- cd googletest/build
- cmake ..
- make -j $(nproc)
- make install
- popd
- cd -
build_program:
stage: build
......
......@@ -6,19 +6,10 @@
#include "CIRunJobHead.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "MockCIEnvironment.h"
using ::testing::Test;
class MockCIEnvironment : public Environment {
public:
MOCK_METHOD(int, GetExitSystemFailure, (), (override));
MOCK_METHOD(int, GetExitBuildFailure, (), (override));
MOCK_METHOD(std::filesystem::path, GetHome, (), (override));
MOCK_METHOD(std::filesystem::path, GetBuildsDir, (), (override));
MOCK_METHOD(std::filesystem::path, GetCacheDir, (), (override));
MOCK_METHOD(std::string, GetVariable, (std::string), (override));
};
class CIJobFactoryCreateJobTest : public Test {
protected:
CIJobFactoryCreateJobTest()
......
#ifndef MOCKCIENVIRONMENT_H
#define MOCKCIENVIRONMENT_H
#include "Environment.h"
#include "gmock/gmock.h"
class MockCIEnvironment : public Environment {
public:
MOCK_METHOD(int, GetExitSystemFailure, (), (override));
MOCK_METHOD(int, GetExitBuildFailure, (), (override));
MOCK_METHOD(std::filesystem::path, GetHome, (), (override));
MOCK_METHOD(std::filesystem::path, GetBuildsDir, (), (override));
MOCK_METHOD(std::filesystem::path, GetCacheDir, (), (override));
MOCK_METHOD(std::string, GetVariable, (std::string), (override));
};
#endif // MOCKCIENVIRONMENT_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment