package cib4132004.tarea12;
import junit.framework.*;
public class FechaTest extends TestCase {
    public FechaTest(java.lang.String testName) {
        super(testName);
    }    
    public static void main(java.lang.String[] args) {
        junit.textui.TestRunner.run(suite());
    }
    public static Test suite() {
        TestSuite suite = new TestSuite(FechaTest.class);
        return suite;
    }
    private Fecha fecha;
      protected void setUp() throws java.lang.Exception {
        fecha = new Fecha();
    }
    /** Test of convertir method, of class cib4132004.tarea12.Fecha. */
    public void testConvertir() {
     String entrada = "2002/09/24";
     fecha.convertir(entrada);
     Assert.assertEquals("testConvertir anio incorrecto",2002,fecha.getAnio());
     Assert.assertEquals("testConvertir mes incorrecto",9,fecha.getMes());
     Assert.assertEquals("testConvertir dia incorrecto",24,fecha.getDia());
    }
    /** Test of getCadenaFormato method, of class cib4132004.tarea12.Fecha. */
    public void testGetCadenaFormato() {
        Assert.assertEquals("testGetCadenaFormato fallo","2001/1/1",
           fecha.getCadenaFormato());
    }
    /** Test of getAnio method, of class cib4132004.tarea12.Fecha. */
    public void testGetAnio() {
         Assert.assertEquals("testGetAnio fallo",2001,
           fecha.getAnio());
    }
    
    /** Test of setAnio method, of class cib4132004.tarea12.Fecha. */
    public void testSetAnio() {
        System.out.println("testSetAnio");
        
        // Add your test code below by replacing the default call to fail.
        fail("The test case is empty.");
    }
    
    /** Test of getDia method, of class cib4132004.tarea12.Fecha. */
    public void testGetDia() {
        System.out.println("testGetDia");
        
        // Add your test code below by replacing the default call to fail.
        fail("The test case is empty.");
    }
    
    /** Test of setDia method, of class cib4132004.tarea12.Fecha. */
    public void testSetDia() {
        System.out.println("testSetDia");
        
        // Add your test code below by replacing the default call to fail.
        fail("The test case is empty.");
    }
    
    /** Test of getMes method, of class cib4132004.tarea12.Fecha. */
    public void testGetMes() {
        System.out.println("testGetMes");
        
        // Add your test code below by replacing the default call to fail.
        fail("The test case is empty.");
    }
    
    /** Test of setMes method, of class cib4132004.tarea12.Fecha. */
    public void testSetMes() {
        System.out.println("testSetMes");
        
        // Add your test code below by replacing the default call to fail.
        fail("The test case is empty.");
    }
    
  
    
    // Add test methods here, they have to start with 'test' name.
    // for example:
    // public void testHello() {}
    
    
}
