ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
EL::UnitTestConfig Struct Reference

a class describing how to run the jobs for driver unit tests More...

#include <UnitTestConfig.h>

Collaboration diagram for EL::UnitTestConfig:

Public Member Functions

virtual ~UnitTestConfig () noexcept=default
 virtual destructor for virtual base class More...
 
virtual std::unique_ptr< SH::DiskWritermake_file_writer (const std::string &name) const
 create a file write for the given file More...
 
virtual void setupJob (Job &job) const
 apply extra job configuration parameters More...
 

Public Attributes

std::shared_ptr< Driverm_driver
 the driver being tested More...
 

Detailed Description

a class describing how to run the jobs for driver unit tests

This is so that I can write driver unit tests as briefly as possible. The unit tests should derive a class from this class that sets the proper members in the constructor and then pass the object into the parametric unit test.

Definition at line 27 of file UnitTestConfig.h.

Constructor & Destructor Documentation

◆ ~UnitTestConfig()

virtual EL::UnitTestConfig::~UnitTestConfig ( )
virtualdefaultnoexcept

virtual destructor for virtual base class

Guarantee
no-fail

Member Function Documentation

◆ make_file_writer()

std::unique_ptr< SH::DiskWriter > EL::UnitTestConfig::make_file_writer ( const std::string &  name) const
virtual

create a file write for the given file

This allows to place the test files into non-standard locations

Guarantee
basic
Failures
i/o errors

Definition at line 23 of file UnitTestConfig.cxx.

25  {
26  return std::unique_ptr<SH::DiskWriterLocal>
27  (new SH::DiskWriterLocal ("data/" + name));
28  }

◆ setupJob()

void EL::UnitTestConfig::setupJob ( Job job) const
virtual

apply extra job configuration parameters

Guarantee
basic
Failures
config specific

Definition at line 32 of file UnitTestConfig.cxx.

34  {}

Member Data Documentation

◆ m_driver

std::shared_ptr<Driver> EL::UnitTestConfig::m_driver

the driver being tested

This is the only member the derived classes actually have to set. More members will be added over time, but those will meaningful default values

Definition at line 35 of file UnitTestConfig.h.


The documentation for this struct was generated from the following files:
SH::DiskWriterLocal
an implementation of DiskWriter for local files
Definition: DiskWriterLocal.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221