Package org.dbunit.dataset

Examples of org.dbunit.dataset.ITable


    public void testDeleteDoesNotDeleteBusinessValue() throws Exception {
       
        storyMapper.delete(storyToUpdate);
       
        // check
        ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_BUSINESSVALUE);
       
        assertEquals("number of row", 1, databaseData.getRowCount());
       
    }
View Full Code Here


    public void testDeleteDoesNotDeleteRiskLevel() throws Exception {
       
        storyMapper.delete(storyToUpdate);
       
        // check
        ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_RISKLEVEL);
       
        assertEquals("number of row", 1, databaseData.getRowCount());
       
    }
View Full Code Here

       
        // add
        releaseMapper.addOrUpdate(release);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_ADD);
       
    assertEquals("number of row", 1, databaseData.getRowCount());
   
    assertEquals("pro_id", new Integer(2), (Integer) databaseData.getValue(0, "pro_id"));
    assertEquals("number", "2B", databaseData.getValue(0, "number"));
    // TODO Comment tester les dates ???
    //assertEquals("date", date, (Date)databaseData.getValue(0, "date") );
    assertEquals("version", new Long(0), (Long) databaseData.getValue(0, "version"));
       
    }
View Full Code Here

       
        // add
        releaseMapper.addOrUpdate(release);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_ADD);
       
    assertEquals("number of row", 1, databaseData.getRowCount());
   
    assertEquals("pro_id", new Integer(2), (Integer) databaseData.getValue(0, "pro_id"));
    assertEquals("number", "2B", databaseData.getValue(0, "number"));
    // TODO Comment tester les dates ???
    //assertEquals("date", date, (Date)databaseData.getValue(0, "date") );
    assertEquals("version", new Long(0), (Long) databaseData.getValue(0, "version"));
   
    // récupération des id pour tester que les stories ont bien cette nouvelle release
    Integer releasePersistanceId = (Integer) databaseData.getValue(0, "id");
   
    // check the stories
    databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY1);
    assertEquals("id", new Integer(1), (Integer) databaseData.getValue(0, "id"));
    assertEquals("rel_id", releasePersistanceId, (Integer) databaseData.getValue(0, "rel_id"));
   
    databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY2);
    assertEquals("id", new Integer(2), (Integer) databaseData.getValue(0, "id"));
    assertEquals("rel_id", releasePersistanceId, (Integer) databaseData.getValue(0, "rel_id"));
       
    }   
View Full Code Here

        release.getProject().setName("super B");
       
        releaseMapper.addOrUpdate(release);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_BASICPROJECT);       
    assertEquals("number of row", 1, databaseData.getRowCount());
    assertEquals("name", "Super A", databaseData.getValue(0, "name"));
       
       
    }
View Full Code Here

        release.getStories().add(story2);
       
        releaseMapper.addOrUpdate(release);
       
    // check the stories
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY1);
    assertEquals("id", new Integer(1), (Integer) databaseData.getValue(0, "id"));
    assertEquals("description", "faire un report d'avancement des tâches à modifier", (String) databaseData.getValue(0, "description"));
   
    databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY2);
    assertEquals("id", new Integer(2), (Integer) databaseData.getValue(0, "id"));
    assertEquals("description", "faire une revue de code de l'iteration courant", (String) databaseData.getValue(0, "description"));
       
    }
View Full Code Here

    public void testDeleteWhenReleaseExists() throws Exception {
       
        releaseMapper.delete(releaseToDelete);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_DELETE);       
    assertEquals("number of row", 0, databaseData.getRowCount());
       
    }
View Full Code Here

    public void testDeleteDoesNotDeleteProjet() throws Exception {
       
        releaseMapper.delete(releaseToDelete);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_BASICPROJECT);       
    assertEquals("number of row", 1, databaseData.getRowCount());
       
    }
View Full Code Here

       
        // update
        releaseMapper.addOrUpdate(release);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_UPDATE);
       
    assertEquals("number of row", 1, databaseData.getRowCount());
   
    assertEquals("pro_id", new Integer(2), (Integer) databaseData.getValue(0, "pro_id"));
    assertEquals("number", number, databaseData.getValue(0, "number"));
    // TODO Comment comparer les dates ??   
    // assertEquals("date", date, (Date)databaseData.getValue(0, "date") );
    assertEquals("version", new Long(persistanceVersion + 1), (Long) databaseData.getValue(0, "version"));
       
    }
View Full Code Here

       
        // add
        releaseMapper.addOrUpdate(release);
       
        // check
    ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_UPDATE);
       
    assertEquals("number of row", 1, databaseData.getRowCount());
   
    assertEquals("pro_id", new Integer(2), (Integer) databaseData.getValue(0, "pro_id"));
    assertEquals("number", number, databaseData.getValue(0, "number"));
    // TODO Comment comparer les dates ??   
    // assertEquals("date", date, (Date)databaseData.getValue(0, "date") );
    assertEquals("version", new Long(persistanceVersion + 1), (Long) databaseData.getValue(0, "version"));
   
    // check the stories
    databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY1);
    assertEquals("id", new Integer(1), (Integer) databaseData.getValue(0, "id"));
    assertEquals("rel_id", new Integer(release.getPersistanceId()), (Integer) databaseData.getValue(0, "rel_id"));
   
    databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY2);
    assertEquals("id", new Integer(2), (Integer) databaseData.getValue(0, "id"));
    assertEquals("rel_id", new Integer(release.getPersistanceId()), (Integer) databaseData.getValue(0, "rel_id"));
       
    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.ITable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.