STest.java [test/service_tests] Revision: 1572f2247372537df70090f135538920c9cc91ba  Date: Mon Sep 12 14:29:39 MDT 2016
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 {
        for (int i = 0; i < 50; i++) {
            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);
            System.out.println(i);
            Thread.sleep(2000);
            System.out.flush();
        }
    }


    @Test
    public void m_simpleservice_2_0__base() throws Exception {
        run();
    }
//    @Test public void m_simpleservice_2_0__variant()    throws Exception { run(); }
//    @Test public void m_simpleservice_2_0__zero()       throws Exception { run(); }
}