STest.java [test/service_tests] Revision:   Date:
package service_tests;

import csip.test.ServiceTest2;
import java.io.File;
import java.util.Properties;
import org.codehaus.jettison.json.JSONArray;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;

/**
 *
 * @author od
 */
public class STest {

    @Rule
    public TestName name = new TestName();

    private void run() throws Exception {
        String testFolder = new File(getClass().getCanonicalName().replace('.', '/')).getParent();
        JSONArray r = ServiceTest2.run(new Properties(), "test/" + testFolder + "/" + name.getMethodName() + ".json");
        Assert.assertTrue(r.getJSONObject(0).getInt("successful") == 1);
    }


    //Baseflow
    @Test public void m_baseflow_1_0_CDSN()     throws Exception { run(); }
    @Test public void m_baseflow_1_0_CDWR()     throws Exception { run(); }
    @Test public void m_baseflow_1_0_STORET()     throws Exception { run(); }
    @Test public void m_baseflow_1_0_USGS()     throws Exception { run(); }
    
    //Download
    @Test public void m_download_1_0_CDSN_flood()     throws Exception { run(); }
    @Test public void m_download_1_0_CDSN_flow()     throws Exception { run(); }
    @Test public void m_download_1_0_CDWR_15min()     throws Exception { run(); }
    @Test public void m_download_1_0_CDWR_flood()     throws Exception { run(); }
    @Test public void m_download_1_0_CDWR_flow()     throws Exception { run(); }
    @Test public void m_download_1_0_CDWR_stage()     throws Exception { run(); }
    @Test public void m_download_1_0_STORET_flood()     throws Exception { run(); }
    @Test public void m_download_1_0_STORET_flow()     throws Exception { run(); }
    @Test public void m_download_1_0_STORET_wq()     throws Exception { run(); }
    @Test public void m_download_1_0_USGS_15min()     throws Exception { run(); }
    @Test public void m_download_1_0_USGS_flood()     throws Exception { run(); }
    @Test public void m_download_1_0_USGS_flow()     throws Exception { run(); }
    @Test public void m_download_1_0_USGS_stage()     throws Exception { run(); }
    @Test public void m_download_1_0_USGS_wq()     throws Exception { run(); }
    
    //Drought
    @Test public void m_drought_1_0_CDSN()     throws Exception { run(); }
    @Test public void m_drought_1_0_CDWR()     throws Exception { run(); }
    @Test public void m_drought_1_0_USGS()     throws Exception { run(); }
    
    //Duration Curve
    @Test public void m_durationcurve_1_0_CDSN_fdc()     throws Exception { run(); }
    @Test public void m_durationcurve_1_0_CDWR_fdc()     throws Exception { run(); }
    @Test public void m_durationcurve_1_0_STORET_fdc()     throws Exception { run(); }
    @Test public void m_durationcurve_1_0_STORET_ldc()     throws Exception { run(); }
    @Test public void m_durationcurve_1_0_USGS_fdc()     throws Exception { run(); }
    @Test public void m_durationcurve_1_0_USGS_ldc()     throws Exception { run(); }
    
    //Flood analysis
    @Test public void m_flood_1_0_CDWR()     throws Exception { run(); }
    @Test public void m_flood_1_0_STORET()     throws Exception { run(); }
    @Test public void m_flood_1_0_USGS()     throws Exception { run(); }
    
    //Load Estimation
    @Test public void m_loadest_1_0_STORET()     throws Exception { run(); }
    @Test public void m_loadest_1_0_USGS()     throws Exception { run(); }
    
    //regional flow duration curve
    @Test public void m_regionalfdc_1_0_fake()     throws Exception { run(); }
    
    //Stage-Discharge relationship
    @Test public void m_stagedischarge_1_0_CDWR()     throws Exception { run(); }
    @Test public void m_stagedischarge_1_0_USGS()     throws Exception { run(); }
    
    //STORET data extraction
    @Test public void m_storetservice_1_0_all()     throws Exception { run(); }
    @Test public void m_storetservice_1_0_flow()     throws Exception { run(); }
    
    //15 minute data timeseries analysis
    @Test public void m_timeseries15min_1_0_CDWR()     throws Exception { run(); }
    @Test public void m_timeseries15min_1_0_USGS()     throws Exception { run(); }
    
    //Timeseries analysis
    @Test public void m_timeseries_1_0_CDSN_flow()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_CDWR_flow()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_STORET_flow()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_STORET_wq()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_USGS_flow()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_USGS_lowflow()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_USGS_wq()     throws Exception { run(); }
    @Test public void m_timeseries_1_0_UserData_flow()     throws Exception { run(); }
}