package org.interonet.ldm;

import com.jcraft.jsch.JSchException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.dom4j.DocumentException;
import org.interonet.ldm.VMM.createVirtualMachine;
import org.interonet.ldm.VMM.initBridgeVLAN;
import org.libvirt.Connect;
import org.libvirt.LibvirtException;

/**
 * Unit test for simple Main.
 */
public class MainTest
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public MainTest(String testName)
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( MainTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp() throws JSchException, LibvirtException, DocumentException {
        initBridgeVLAN bridge = new initBridgeVLAN();
        bridge.createBridge();
        bridge.createVLAN();
        bridge.addBridgeToVlan();
       Connect conn = new Connect("qemu+tcp://400@202.117.15.94/system",false);
        createVirtualMachine vmm = new createVirtualMachine();
        int ID=2;
        vmm.vmclone(ID);
        vmm.vmstart(conn, ID);
//        deleteVirtualMachine vm = new deleteVirtualMachine();
//        vm.vmdestroy(conn,ID);
//        vm.vmdelete(ID);



        assertTrue(true);
    }
}

@@ -25,46 +25,8 @@
 m;%0A%0A
-import com.jcraft.jsch.JSchException;%0A
 impo
@@ -121,384 +121,53 @@
 te;%0A
-import org.dom4j.DocumentException;%0Aimport org.interonet.ldm.VMM.createVirtualMachine;%0Aimport org.interonet.ldm.VMM.initBridgeVLAN;%0Aimport org.libvirt.Connect;%0Aimport org.libvirt.LibvirtException;%0A%0A/**%0A * Unit test for simple Main.%0A */%0Apublic class MainTest%0A    extends TestCase%0A%7B%0A    /**%0A     * Create the test case%0A     *%0A     * @param testName name of the test case%0A     */
+%0Apublic class MainTest%0A    extends TestCase%0A%7B
 %0A   
@@ -244,71 +244,8 @@
  %7D%0A%0A
-    /**%0A     * @return the suite of tests being tested%0A     */%0A
     
@@ -340,623 +340,31 @@
     
-/**%0A     * Rigourous Test :-)%0A     */%0A    public void testApp() throws JSchException, LibvirtException, DocumentException %7B%0A        initBridgeVLAN bridge = new initBridgeVLAN();%0A        bridge.createBridge();%0A        bridge.createVLAN();%0A        bridge.addBridgeToVlan();%0A       Connect conn = new Connect(%22qemu+tcp://400@202.117.15.94/system%22,false);%0A        createVirtualMachine vmm = new createVirtualMachine();%0A        int ID=2;%0A        vmm.vmclone(ID);%0A        vmm.vmstart(conn, ID);%0A//        deleteVirtualMachine vm = new deleteVirtualMachine();%0A//        vm.vmdestroy(conn,ID);%0A//        vm.vmdelete(ID);%0A%0A%0A
+public void testApp() %7B
 %0A   

delete the untested code.