OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WProtonDataTest Class Reference

Test class of WMProtonData class. More...

#include <WProtonData_test.h>

+ Inheritance diagram for WProtonDataTest:
+ Collaboration diagram for WProtonDataTest:

Public Member Functions

void testConstructor ()
 Test the constructor of WProtonData, so no exception is thrown, when input parameters are correct. More...
 
void testSetCSVHeaderEmpty ()
 Tests, if setCSVHeader throws an exception, when the new header is empty. More...
 
void testSetCSVHeaderNull ()
 Tests, if setCSVHeader throws an exception, when parameter is a null pointer. More...
 
void testSetCSVDataNull ()
 Tests, if setCSVHeader throws an exception, when parameter is a null pointer. More...
 
void testSetterGetterStateIndex ()
 Tests the setter and getter for the member variable -m_ColumnnMapSelectedIndex-. More...
 
void testIsColumnAvailable ()
 Tests the availability of the single selections. More...
 
void testGetColumnIndex ()
 Tests the content of -m_columnMap-. More...
 
void testDetermineColumnTypeByString ()
 Tests method -determineColumnTypeByString-. More...
 
void testDetectColumnTypesFromCsvData ()
 Tests internal variable m_columnTypes with the method -getColumnTypes-. More...
 

Private Attributes

WDataSetCSV::Content sampleColumnNames
 A sample of column names. More...
 
WDataSetCSV::Content sampleDataRows
 A sample of data rows. More...
 

Detailed Description

Test class of WMProtonData class.

Definition at line 41 of file WProtonData_test.h.

Member Function Documentation

◆ testConstructor()

void WProtonDataTest::testConstructor ( )
inline

Test the constructor of WProtonData, so no exception is thrown, when input parameters are correct.

Definition at line 98 of file WProtonData_test.h.

References sampleColumnNames, and sampleDataRows.

◆ testDetectColumnTypesFromCsvData()

void WProtonDataTest::testDetectColumnTypesFromCsvData ( )
inline

Tests internal variable m_columnTypes with the method -getColumnTypes-.

Definition at line 287 of file WProtonData_test.h.

References WProtonData::getColumnTypes(), sampleColumnNames, and sampleDataRows.

+ Here is the call graph for this function:

◆ testDetermineColumnTypeByString()

void WProtonDataTest::testDetermineColumnTypeByString ( )
inline

Tests method -determineColumnTypeByString-.

Definition at line 240 of file WProtonData_test.h.

References WProtonData::determineColumnTypeByString(), sampleColumnNames, and sampleDataRows.

+ Here is the call graph for this function:

◆ testGetColumnIndex()

void WProtonDataTest::testGetColumnIndex ( )
inline

Tests the content of -m_columnMap-.

Definition at line 220 of file WProtonData_test.h.

References WProtonData::getColumnIndex(), sampleColumnNames, and sampleDataRows.

+ Here is the call graph for this function:

◆ testIsColumnAvailable()

void WProtonDataTest::testIsColumnAvailable ( )
inline

Tests the availability of the single selections.

Definition at line 184 of file WProtonData_test.h.

References WProtonData::isColumnAvailable(), sampleColumnNames, sampleDataRows, and WProtonData::setStateIndex().

+ Here is the call graph for this function:

◆ testSetCSVDataNull()

void WProtonDataTest::testSetCSVDataNull ( )
inline

Tests, if setCSVHeader throws an exception, when parameter is a null pointer.

Definition at line 143 of file WProtonData_test.h.

References sampleColumnNames, sampleDataRows, WProtonData::setCSVData(), and WException::what().

+ Here is the call graph for this function:

◆ testSetCSVHeaderEmpty()

void WProtonDataTest::testSetCSVHeaderEmpty ( )
inline

Tests, if setCSVHeader throws an exception, when the new header is empty.

Definition at line 109 of file WProtonData_test.h.

References sampleColumnNames, sampleDataRows, WProtonData::setCSVHeader(), and WException::what().

+ Here is the call graph for this function:

◆ testSetCSVHeaderNull()

void WProtonDataTest::testSetCSVHeaderNull ( )
inline

Tests, if setCSVHeader throws an exception, when parameter is a null pointer.

Definition at line 126 of file WProtonData_test.h.

References sampleColumnNames, sampleDataRows, WProtonData::setCSVHeader(), and WException::what().

+ Here is the call graph for this function:

◆ testSetterGetterStateIndex()

void WProtonDataTest::testSetterGetterStateIndex ( )
inline

Tests the setter and getter for the member variable -m_ColumnnMapSelectedIndex-.

Definition at line 160 of file WProtonData_test.h.

References WProtonData::getColumnIndexBySelection(), sampleColumnNames, sampleDataRows, and WProtonData::setStateIndex().

+ Here is the call graph for this function:

Member Data Documentation

◆ sampleColumnNames

WDataSetCSV::Content WProtonDataTest::sampleColumnNames
private
Initial value:
=
{
{
"PDGEncoding", "trackID", "parentID", "trackLocalTime", "time", "edep", "stepLength", "trackLength",
"posX", "posY", "posZ", "localPosX", "localPosY", "localPosZ", "momDirX", "momDirY", "momDirZ",
"baseID", "level1ID", "level2ID", "level3ID", "level4ID", "layerID", "photonID", "nPhantomCompton",
"nCrystalCompton", "nPhantomRayleigh", "nCrystalRayleigh", "primaryID", "sourcePosX", "sourcePosY",
"sourcePosZ", "sourceID", "eventID", "runID", "axialPos", "rotationAngle", "volumeID", "processName",
"comptVolName", "RayleighVolName"
}
}

A sample of column names.

Definition at line 46 of file WProtonData_test.h.

Referenced by testConstructor(), testDetectColumnTypesFromCsvData(), testDetermineColumnTypeByString(), testGetColumnIndex(), testIsColumnAvailable(), testSetCSVDataNull(), testSetCSVHeaderEmpty(), testSetCSVHeaderNull(), and testSetterGetterStateIndex().

◆ sampleDataRows

WDataSetCSV::Content WProtonDataTest::sampleDataRows
private

The documentation for this class was generated from the following file: