STest.java [test/service_tests] Revision: 67d7504be076af3d7447a94d5a276077ba3e5d50  Date: Tue Apr 12 13:42:51 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 {
        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);
    }

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