package kg.apc.cmd;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author undera
 */
public class UniversalRunnerTest {

    public UniversalRunnerTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
       // JMeterUtils.setJMeterHome("");
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of addURL method, of class NewDriver.
     */
    @Test
    public void testAddURL_URL() throws MalformedURLException {
        System.out.println("addURL");
        URL url = new URL("http://localhost/");
        UniversalRunner.addURL(url);
    }

    /**
     * Test of addPath method, of class NewDriver.
     */
    @Test
    public void testAddPath() throws Exception {
        System.out.println("addPath");
        String path = "/";
        UniversalRunner.addPath(path);
    }

    /**
     * Test of getJMeterDir method, of class NewDriver.
     */
    @Test
    public void testGetJMeterDir() {
        System.out.println("getJMeterDir");
        String result = UniversalRunner.getJMeterDir();
        assertTrue(result.length()>0);
    }

    /**
     * Test of main method, of class NewDriver.
     */
    @Test
    public void testMain() throws Throwable {
        System.out.println("main");
        String[] args = "--help".split(" ");
        UniversalRunner.main(args);
    }

    /**
     * Test of addURL method, of class NewDriver.
     */
    @Test
    public void testAddURL() {
        System.out.println("addURL");
        URL url = null;
        UniversalRunner.addURL(url);
    }

    /**
     * Test of getJarDirectory method, of class UniversalRunner.
     */
    @Test
    public void testGetJarDirectory() {
        System.out.println("getJarDirectory");
        String initial_classpath = "";
        String expResult = "";
        String result = UniversalRunner.getJarDirectory(initial_classpath);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of buildUpdatedClassPath method, of class UniversalRunner.
     */
    @Test
    public void testBuildUpdatedClassPath() {
        System.out.println("buildUpdatedClassPath");
        List<URL> jars = null;
        StringBuilder expResult = null;
        StringBuilder result = UniversalRunner.buildUpdatedClassPath(jars);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
}
@@ -74,16 +74,44 @@
 et.URL;%0A
+import java.util.ArrayList;%0A
 import j
@@ -121,24 +121,24 @@
 .util.List;%0A
-
 import org.j
@@ -592,24 +592,25 @@
 d setUp() %7B%0A
+ 
        // JM
@@ -634,24 +634,24 @@
 erHome(%22%22);%0A
-
     %7D%0A%0A    @
@@ -1453,17 +1453,19 @@
 length()
-%3E
+ %3E 
 0);%0A    
@@ -2145,39 +2145,8 @@
 %22%22;%0A
-        String expResult = %22%22;%0A
     
@@ -2235,163 +2235,22 @@
 sert
-Equals(expResult, result);%0A        // TODO review the generated test code and remove the default call to fail.%0A        fail(%22The test case is a prototype.%22
+NotNull(result
 );%0A 
@@ -2481,51 +2481,27 @@
  = n
-ull;%0A        StringBuilder expResult = null
+ew ArrayList%3CURL%3E()
 ;%0A  
@@ -2592,163 +2592,33 @@
 sert
-Equals(expResult, result);%0A        // TODO review the generated test code and remove the default call to fail.%0A        fail(%22The test case is a prototype.%22
+NotNull(result.toString()
 );%0A 

Fix test