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);
    }


    // all test cases. the name corresponds to the 
    // json file name with no extension
    @Test public void m_weps_1_3__z4_corn_soybean()     throws Exception { run(); }
    @Test public void m_weps_1_3__wheat()               throws Exception { run(); }
    @Test public void m_weps_1_3__potato()              throws Exception { run(); }
    @Test public void m_weps_1_3__brad_missing_radius() throws Exception { run(); }
    @Test public void m_weps_1_3__jack_error()          throws Exception { run(); }
    
    // r2 tests
    @Test public void m_rusle2_1_3__cotton_delta()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__iet_r2_test_1()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__iet_r2_test_2()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__iet_r2_test_3()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__LucasNoCropGrowthEx_newsoil()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__practice1()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__practice2()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__practice3()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__practice4()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_10()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_1()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_2()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_3()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_4()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_5()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_6()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_7()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_8()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_9()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_request_with_practices()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__r2_sci_test()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__RockCover()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl13()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl15()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl16()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl17()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl19()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl20()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl22()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl24()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl25()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl27()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl29()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl31()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl32()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl33()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl35()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl37()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl38()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl3()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl40()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl42()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl43()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl45()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl47()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl48()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl49()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl51()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl53()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl55()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl56()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl57()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl59()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl61()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl63()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl64()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl65()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl67()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl69()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl6()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl71()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl72()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl74()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl75()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl77()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl79()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl80()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl82()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl84()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl86()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl87()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl89()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl90()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl92()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusl94()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusle2_input_zedx_12102015()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusle2_slash_issue2()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__rusle2_slash_issue()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__story_county_ia()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__zedx_bad1()      throws Exception { run(); } 
    @Test public void m_rusle2_1_3__zedx_r2_error_2b()      throws Exception { run(); } 
    
    
    // R2 2.0
    @Test public void m_rusle2_2_0__PumpkinBaseRunContour()      throws Exception { run(); } 
    @Test public void m_rusle2_2_0__PumpkinBaseRunHydElem()      throws Exception { run(); } 
    @Test public void m_rusle2_2_0__PumpkinBaseRun()      throws Exception { run(); } 
    @Test public void m_rusle2_2_0__PumpkinBaseRunStrip()      throws Exception { run(); } 
    
}