Mantid
Loading...
Searching...
No Matches
MockQtAlgorithmRunner.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12
13#include <gmock/gmock.h>
14
15using namespace MantidQt::API;
16
18
20public:
22 MOCK_METHOD1(startAlgorithmImpl, void(Mantid::API::IAlgorithm_sptr));
24
25 // Wrapper around startAlgorithmImpl to allow us to record
26 // which algorithm was started
28 m_algorithm = alg;
29 startAlgorithmImpl(alg);
30 }
31
33
34private:
36};
37
#define GNU_DIAG_ON_SUGGEST_OVERRIDE
#define GNU_DIAG_OFF_SUGGEST_OVERRIDE
The QtAlgorithmRunner is a QObject that encapsulates methods for running an algorithm asynchronously ...
virtual Mantid::API::IAlgorithm_sptr getAlgorithm() const
Get back a pointer to the running algorithm.
MOCK_METHOD1(startAlgorithmImpl, void(Mantid::API::IAlgorithm_sptr))
Mantid::API::IAlgorithm_sptr algorithm() const
MockQtAlgorithmRunner()=default
void startAlgorithm(Mantid::API::IAlgorithm_sptr alg)
Begin asynchronous execution of an algorithm and observe its execution.
MOCK_CONST_METHOD0(getAlgorithm, Mantid::API::IAlgorithm_sptr())
Mantid::API::IAlgorithm_sptr m_algorithm
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm