@@ -0,0 +1,1466 @@
+package test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport functions.TestGenerator;%0Aimport model.SpoonedClass;%0Aimport utils.SpoonUtils;%0A%0Apublic class TestGeneratorTest%0A%7B%0A%0A%09private SpoonedClass _spoonedClass;%0A%0A%09@Before%0A%09public void setup()%0A%09%7B%0A%09%09_spoonedClass = new SpoonedClass(%22/media/javi/DATOS/workspace/Eclipse/TPs_UNGS/GCT/src/test/Ejemplo.java%22);%0A%09%09try%0A%09%09%7B%0A%09%09%09_spoonedClass.loadClass();%0A%09%09%7D catch (Exception e)%0A%09%09%7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void testExecute1() throws InstantiationException, IllegalAccessException, NoSuchMethodException,%0A%09%09%09SecurityException, ClassNotFoundException%0A%09%7B%0A%09%09Object%5B%5D parameters = new Object%5B1%5D;%0A%09%09parameters%5B0%5D = 0;%0A%0A%09%09String methodName = %22m0%22;%0A%09%09Object ret = TestGenerator.execute(%22test.Ejemplo%22, methodName, parameters,%0A%09%09%09%09SpoonUtils.getParametersTypes(_spoonedClass.getSpoonedMethod(methodName)));%0A%09%09assertEquals(0, ret);%0A%09%7D%0A%0A%09@Test%0A%09public void testExecute2() throws InstantiationException, IllegalAccessException, NoSuchMethodException,%0A%09%09%09SecurityException, ClassNotFoundException%0A%09%7B%0A%09%09Object%5B%5D parameters = new Object%5B3%5D;%0A%09%09parameters%5B0%5D = 0;%0A%09%09parameters%5B1%5D = 1;%0A%09%09parameters%5B2%5D = 3;%0A%0A%09%09String methodName = %22getMax%22;%0A%09%09Object ret = TestGenerator.execute(%22test.Ejemplo%22, methodName, parameters,%0A%09%09%09%09SpoonUtils.getParametersTypes(_spoonedClass.getSpoonedMethod(methodName)));%0A%09%09assertEquals(3, ret);%0A%09%7D%0A%0A%7D%0A

add test