import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Constructor;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.Map;
import java.util.Hashtable;
import java.util.List;
import java.util.LinkedList;
import codeassess.javassessment.Assessor;
import codeassess.misc.Misc;

public class Template extends Assessor {

    public Map<String, String> getConfig() {
        final Map<String, String> config = new Hashtable<String, String>();
        config.put("Language", "Java");
        config.put("Extensions", ".java");
        config.put("AssessmentMode", "SemiAutomatic");
        return config;
    }

    public List<Object[]> getProperties() {
        final List<Object[]> properties = new LinkedList<Object[]>();
        properties.add(new Object[] { "Eval1", "Functionality", null, new String[] {  }, "Figura.java", "Figura debe tener un atributo para la textura", "Errores detectados", 0.0 });
        properties.add(new Object[] { "Eval2", "Functionality", null, new String[] {  }, "Figura.java", "Figura debe tener un atributo para la textura", "FIGURA: Debe existir un atributo entero para la textura", 0.2 });
        properties.add(new Object[] { "Eval3", "Functionality", null, new String[] {  }, "Figura.java", "Debes crear un constructor de la clase Figura que no reciba una textura", "FIGURA: Crear un constructor que NO reciba una textura", 0.1 });
        properties.add(new Object[] { "Eval4", "Functionality", null, new String[] {  }, "Figura.java", "Debes crear un constructor de la clase Figura que reciba una textura", "FIGURA: Crear un constructor que SI reciba una textura", 0.1 });
        properties.add(new Object[] { "Eval5", "Functionality", null, new String[] {  }, "Circulo.java", "Debes crear el constructor", "CIRCULO: Crear un constructor que NO reciba una textura", 0.05 });
        properties.add(new Object[] { "Eval6", "Functionality", null, new String[] {  }, "Rectangulo.java", "Debes crear el constructor", "RECTANGULO: Crear un constructor que NO reciba una textura", 0.05 });
        properties.add(new Object[] { "Eval7", "Functionality", null, new String[] {  }, "Circulo.java", "Debes crear el constructor", "CIRCULO: Crear un constructor que SI reciba una textura", 0.1 });
        properties.add(new Object[] { "Eval8", "Functionality", null, new String[] {  }, "Rectangulo.java", "Debes crear el constructor", "RECTANGULO: Crear un constructor que SI reciba una textura", 0.1 });
        properties.add(new Object[] { "Eval9", "Functionality", null, new String[] {  }, "Figura.java", "Solo debes declarar el atributo textura en Figura", "FIGURA: Atributo textura SOLO debe declararse en la clase Figura ", 0.0 });
        properties.add(new Object[] { "Eval11", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes implementar el método numTexturas", "GRUPOFIGURAS: Implementar el método numTexturas", 0.0 });
        properties.add(new Object[] { "Eval12", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes utilizar un bucle para recorrer las figuras", "GRUPOFIGURAS: Implementar un bucle en numTexturas que recorra las figuras", 0.15 });
        properties.add(new Object[] { "Eval13", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes hacer un casting para acceder a la textura", "GRUPOFIGURAS: El método numTexturas está bien implementado", 0.15 });
        return properties;
    }

    public boolean checkEval1() {
        return true;
    }

    public boolean solveEval1() {
        return false;
    }

    public String[] testEval1() {
        return null;
    }


    public boolean checkEval2() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        if (!(super.introspector.checkDeclaredField(class1, "textura", int.class, true) == true)) return false;
        return true;
    }

    public boolean solveEval2() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        super.intercessor.copyField(class1, "textura");
        return true;
    }

    public String[] testEval2() {
        return null;
    }

    public boolean checkEval3() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval3() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval3() {
        if (!(super.tester.executeTestCase("TestCases1", "test1").equals(true))) return new String[] { "TestCases1", "test1" };
        return null;
    }

    public boolean checkEval4() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, int.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval4() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, int.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval4() {
        if (!(super.tester.executeTestCase("TestCases1", "test2").equals(true))) return new String[] { "TestCases1", "test2" };;
        return null;
    }

    public boolean checkEval5() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval5() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval5() {
        if (!(super.tester.executeTestCase("TestCases2", "test1").equals(true))) return new String[] { "TestCases2", "test1" };
        return null;
    }

    public boolean checkEval6() {
        final Class class1 = super.introspector.getClass("Rectangulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, double.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval6() {
        final Class class1 = super.introspector.getClass("Rectangulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, double.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval6() {
        if (!(super.tester.executeTestCase("TestCases3", "test1").equals(true))) return new String[] { "TestCases3", "test1" };
        return null;
    }

    public boolean checkEval7() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, int.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval7() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, int.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval7() {
        if (!(super.tester.executeTestCase("TestCases2", "test2").equals(true))) return new String[] { "TestCases2", "test2" };
        return null;
    }

    public boolean checkEval8() {
        final Class class1 = super.introspector.getClass("Rectangulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, double.class, int.class };
        if (!(super.introspector.checkDeclaredConstructor(class1, classs1, true) == true)) return false;
        return true;
    }

    public boolean solveEval8() {
        final Class class1 = super.introspector.getClass("Rectangulo");
        if (class1 == null) return false;
        final Class[] classs1 = { double.class, double.class, double.class, double.class, int.class };
        super.intercessor.copyConstructor(class1, classs1);
        return true;
    }

    public String[] testEval8() {
        if (!(super.tester.executeTestCase("TestCases3", "test2").equals(true))) return new String[] { "TestCases3", "test2" };
        return null;
    }

    public boolean checkEval9() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        if (!(super.introspector.checkDeclaredField(class1, "textura") == false)) return false;
        final Class class2 = super.introspector.getClass("Rectangulo");
        if (class2 == null) return false;
        if (!(super.introspector.checkDeclaredField(class2, "textura") == false)) return false;
        return true;
    }

    public boolean solveEval9() {
        return false;
    }

    public String[] testEval9() {
        return null;
    }

    public boolean checkEval11() {
        return true;
    }

    public boolean solveEval11() {
        return false;
    }

    public String[] testEval11() {
        return null;
    }

    public boolean checkEval12() {
        final Class class1 = super.introspector.getClass("GrupoFiguras");
        if (class1 == null) return false;
        final Class[] classs1 = {  };
        final Method method1 = super.introspector.getDeclaredMethod(class1, "numTexturas", classs1);
        if (method1 == null) return false;
        return true;
    }

    public boolean solveEval12() {
        return false;
    }

    public String[] testEval12() {
        if (!(super.tester.executeTestCase("TestCases4", "test1").equals(true))) return new String[] { "TestCases4", "test1" };
        if (!(super.tester.executeTestCase("TestCases4", "test2").equals(true))) return new String[] { "TestCases4", "test2" };
        if (!(super.tester.executeTestCase("TestCases4", "test3").equals(true))) return new String[] { "TestCases4", "test3" };
        return null;
    }

    public boolean checkEval13() {
        final Class class1 = super.introspector.getClass("GrupoFiguras");
        if (class1 == null) return false;
        final Class[] classs1 = {  };
        final Method method1 = super.introspector.getDeclaredMethod(class1, "numTexturas", classs1);
        if (method1 == null) return false;
        return true;
    }

    public boolean solveEval13() {
        return false;
    }

    public String[] testEval13() {
        if (!(super.tester.executeTestCase("TestCases5", "test1").equals(true))) return new String[] { "TestCases5", "test1" };
        if (!(super.tester.executeTestCase("TestCases5", "test2").equals(true))) return new String[] { "TestCases5", "test2" };
        if (!(super.tester.executeTestCase("TestCases5", "test3").equals(true))) return new String[] { "TestCases5", "test3" };
        return null;
    }
}