import java.lang.reflect.Field;

public class TestCases4 {

    public boolean test1() throws Throwable {
        GrupoFiguras g = new GrupoFiguras();

        Triangulo tri = new Triangulo(10, 5, 3.5, 1.7);

        g.anyadeTriangulo(tri);

        int numRectangulos = g.numRectangulos();

        return numRectangulos == 0;
    }

    public boolean test2() throws Throwable {
        GrupoFiguras g = new GrupoFiguras();

        Cuadrado cua = new Cuadrado(3.0, 5.0, 2.2);

        g.anyadeCuadrado(cua);

        int numRectangulos = g.numRectangulos();

        return numRectangulos == 1;
    }

    public boolean test3() throws Throwable {
        GrupoFiguras g = new GrupoFiguras();

        Rectangulo rec = new Rectangulo(1.0, 2.0, 5.1, 2.3);

        g.anyadeRectangulo(rec);

        int numRectangulos = g.numRectangulos();

        return numRectangulos == 1;
    }

    private Field getDeclaredField(Class<?> clazz, String fieldName) throws SecurityException {
    	try {
    		return clazz.getDeclaredField(fieldName);
    	}
    	catch (NoSuchFieldException e) {
    		return null;
    	}
    }
    private Object getDeclaredFieldValue(Class<?> clazz, Object obj, String fieldName) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
    	Field field = this.getDeclaredField(clazz, fieldName);

    	field.setAccessible(true);

    	return field.get(obj);
    }
}