36 for (
size_t index = 0; index < records_number; ++index) {
This class has been created to demonstrate unit testing. It is an Interface over a DataSource (a File...
virtual double getRecordValue(std::size_t index) const =0
Fetch the value of the n-th record of the DataSource.
virtual std::size_t countRecords() const =0
Count the number of records into the DataSource.
double sumRecords(const DataSourceInterface &data_source)
Compute the sum of the values of the records stored into the provided DataSource.