diff --git a/qt/scientific_interfaces/Indirect/test/CMakeLists.txt b/qt/scientific_interfaces/Indirect/test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..8c47169d1c2cc585543f6f0f4ae822b336185584 --- /dev/null +++ b/qt/scientific_interfaces/Indirect/test/CMakeLists.txt @@ -0,0 +1,31 @@ +########################################################################### +# Testing +########################################################################### +set ( TEST_FILES + IndirectFitDataTest.h +) + +mtd_add_qt_tests (TARGET_NAME MantidQtInterfacesIndirectTest + QT_VERSION 4 + SRC ${TEST_FILES} + INCLUDE_DIRS + ../../../../Framework/DataObjects/inc + ../../../../Framework/TestHelpers/inc + ../ + TEST_HELPER_SRCS + ../../../../Framework/TestHelpers/src/TearDownWorld.cpp + LINK_LIBS + ${TCMALLOC_LIBRARIES_LINKTIME} + ${CORE_MANTIDLIBS} + DataObjects + ${GMOCK_LIBRARIES} + ${GTEST_LIBRARIES} + ${POCO_LIBRARIES} + ${Boost_LIBRARIES} + QT4_LINK_LIBS + Qwt5 + MTD_QT_LINK_LIBS + MantidScientificInterfacesIndirect + PARENT_DEPENDENCIES + GUITests +) diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h new file mode 100644 index 0000000000000000000000000000000000000000..d85e641aadbe1a1497933c463d085e092fbc916c --- /dev/null +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h @@ -0,0 +1,45 @@ +#ifndef MANTID_INDIRECTFITDATATEST_H_ +#define MANTID_INDIRECTFITDATATEST_H_ + +#include <cxxtest/TestSuite.h> + +#include "IndirectFitData.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/WorkspaceFactory.h" + +#include <iostream> + +using namespace Mantid::API; +using namespace MantidQt::CustomInterfaces::IDA; + +class IndirectFitDataTest : public CxxTest::TestSuite { +public: + static IndirectFitDataTest *createSuite() { + return new IndirectFitDataTest(); + } + + static void destroySuite(IndirectFitDataTest *suite) { delete suite; } + + void test_data_is_instantiated_correctly() { + MatrixWorkspace_sptr workspace = + WorkspaceFactory::Instance().create("Workspace2D", 1, 9, 9); + const Spectra spec = + std::make_pair(0u, workspace->getNumberHistograms() - 1); + // IndirectFitData data(workspace, spec); + + // const std::string name = data.workspace()->getName(); + // std::cout << name << "\n"; + std::cout << "HELLO"; + } + + void test_displayName_returns_correct_name() { + // given - + // the workspace and data + // when - + // the parameters equal so and so + // then - + // the output name should be + } +}; + +#endif