/** \file
 *
 *  Contains unit tests for the TempGradientCalculator class
 *
 *  Copyright (c) 2007,2008,2009,2010 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef _TEMPGRADIENTCALCULATOR_TEST_H_
#define _TEMPGRADIENTCALCULATOR_TEST_H_

#include "TempGradientCalculator.h"

#include <cxxtest/TestSuite.h>

/**
 *  Unit tests for TempGradientCalculator class
 *
 *  \ingroup modules_derivation
 */
class TempGradientCalculator_Test : public CxxTest::TestSuite
{
public:

    // TempGradientCalculator test
    void testTempGradientCalculator( void )
    {
#if 0
        float temp, depth;
        TempGradientCalculator tempGradientCalculator( NULL );
        FILE *ptrFileIn;
        int intFileIn;

        tempGradientCalculator.binsizeDep_ = 1.0;
        tempGradientCalculator.threshDepChangeAbs_ = 0.5;
        tempGradientCalculator.consecutiveDepthsSetting_ = 5;
        tempGradientCalculator.extensionDep_ = 2.0;

        printf( "\nbinsizeDep_ = %5.2f m \n", tempGradientCalculator.binsizeDep_ );
        printf( "threshDepChangeAbs_ = %5.2f m \n", tempGradientCalculator.threshDepChangeAbs_ );
        printf( "numConsecutiveDepths_ = %2i \n", tempGradientCalculator.consecutiveDepthsSetting_ );
        printf( "extensionDep_ = %5.2f m \n\n", tempGradientCalculator.extensionDep_ );

        ptrFileIn = fopen( "dep_temp.dat", "r" );

        while( ( intFileIn = getc( ptrFileIn ) ) != EOF )
        {
            fscanf( ptrFileIn, "%f %f", &depth, &temp );

//    		printf("temp, depth = %5.2f deg C, %5.2f m\n", temp, depth);

            tempGradientCalculator.captureTempGradPeak( temp, depth );

//			printf("tempGrad_, depTempGrad_ = %5.2f degC/m, %5.2f m\n",
//					tempGradientCalculator.tempGrad_, tempGradientCalculator.depTempGrad_);
//			printf("tempGradPk_, depTempGradPk_, depTarget_ = %5.2f degC/m, %5.2f m %5.2f m\n",
//					tempGradientCalculator.tempGradPk_, tempGradientCalculator.depTempGradPk_,
//					tempGradientCalculator.depTarget_);
//    		printf("\n");
        }
        printf( "\n" );
        fclose( ptrFileIn );
#endif
    }
};

#endif // _TEMPGRADIENTCALCULATOR_TEST_H_
