Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxtestProbeFixture.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #include "cxtestProbeFixture.h"
14 
15 #include <QString>
16 
18 #include "cxProbeDefinition.h"
19 #include "cxTestVideoSource.h"
20 #include "cxReporter.h"
21 #include "catch.hpp"
22 
23 namespace cxtest
24 {
25 
27  mDefaultTemporalCalibration(0),
28  mTemporalCalibration(0)
29 {
30  // this stuff will be performed just before all tests in this class
32  this->createTestProbe();
33 }
34 
35 
37 {
38  // this stuff will be performed just after all tests in this class
40 }
41 
42 
44 {
45  this->createParameters();
46  QString xmlFileName = "testXmlFileName";
48  mXml.reset(new ProbeXmlConfigParserMock(xmlFileName));
49  mDefaultRtSourceName = mXml->getRtSourceList(mProbeName, mScannerName)[0];
51 }
52 
53 
55 {
56  QString xmlFileName = "testXmlFileName";
58  bool provideRTSource = false;
59  mXml.reset(new ProbeXmlConfigParserMock(xmlFileName, provideRTSource));
60  mDefaultRtSourceName = QString();
62 }
63 
65 {
66  mProbeName = "TestProbe";
67  mScannerName = "TestScanner";
68  cx::ProbeDefinition probeDefinition;
69  mDefaultProbeDefinitionUid = probeDefinition.getUid(); //Uid set to "default" in ProbeDefinition()
71  mProbeDefinitionUid = "TestprobeDefinition";
72 }
73 
75 {
76  cx::ProbeDefinition probeDefinition = mProbe->getProbeDefinition();
77  probeDefinition.setUid(mProbeDefinitionUid);
78  mTemporalCalibration = 1000.5;
80  return probeDefinition;
81 }
82 
83 } //namespace cxtest
Moc implementation of abstract interface ProbeXmlConfigParser All function return dummy values...
cx::ProbeDefinition createProbeDefinition()
static void shutdown()
shutdown service, destroy static object if none holds a reference.
Definition: cxReporter.cpp:73
static void initialize()
Initialize logging, static object is guaranteed to exist at least until shutdown. ...
Definition: cxReporter.cpp:60
QString getUid() const
cx::ProbeImplPtr mProbe
void setTemporalCalibration(double value)
void setUid(QString uid)
boost::shared_ptr< ProbeXmlConfigParser > ProbeXmlConfigParserPtr
Definition of characteristics for an Ultrasound Probe Sector.
static ProbeImplPtr New(QString instrumentUid, QString scannerUid, ProbeXmlConfigParserPtr xml=ProbeXmlConfigParserPtr())
Definition: cxProbeImpl.cpp:28
double getTemporalCalibration() const