Package net.stinfoservices.pacifiq.server.model

Examples of net.stinfoservices.pacifiq.server.model.SpecificTAA


    @Test
    @DatabaseSetup(value = UPDATESPECIFIC_DATASET)
    @DatabaseTearDown(value = UPDATESPECIFIC_DATASET, type = DatabaseOperation.DELETE)
    public void testFindAllSpecific() throws Exception {
        List<AbstractTAA> taas = taaDAO.findAll();
        SpecificTAA taa = new SpecificTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        assertSame(1, taas.size());
        assertNotNull(taas.get(0));
        assertEquals(taas.get(0), taa);
    }
View Full Code Here


    @Test
    @DatabaseSetup(value = UPDATESPECIFIC_DATASET)
    @DatabaseTearDown(value = UPDATESPECIFIC_DATASET, type = DatabaseOperation.DELETE)
    public void testFindEntriesSpecific() throws Exception {
        List<AbstractTAA> taas = taaDAO.findEntries(0, 1);
        SpecificTAA taa = new SpecificTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        assertSame(1, taas.size());
        assertNotNull(taas.get(0));
        assertEquals(taas.get(0), taa);
        taas = taaDAO.findEntries(0, 0);
        assertSame(0, taas.size());
View Full Code Here

    public void testSaveSpecific() throws Exception {
        try {
            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource("/dbunit/dao/admin/taa-create2_no-id.xml")
                    .openStream());
            SpecificTAA taa = new SpecificTAA();
            AbstractTAA ntaa;

            taa.setId(null);
            taa.setLicenseNumber(DEFAULT_LICENSENUMBER);
            taa.setVersion(1);
            ntaa = taaDAO.save(taa);
            assertEquals(ntaa.getLicenseNumber(), taa.getLicenseNumber());
            entityManager.getTransaction().commit();
            DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
                    connection.createDataSet(expectedDataSet.getTableNames()));
            connection.close();
        } catch (DatabaseUnitException e) {
View Full Code Here

    @DatabaseTearDown(value = UPDATESPECIFIC_DATASET, type = DatabaseOperation.DELETE_ALL)
    public void testSaveSpecific2() throws Exception {
        try {
            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource(UPDATESPECIFIC_DATASET).openStream());
            SpecificTAA taa = new SpecificTAA();
            AbstractTAA ntaa;

            taa.setId(1L);
            taa.setLicenseNumber(UPDATED_LICENSENUMBER);
            taa.setVersion(1);
            ntaa = taaDAO.save(taa);
            assertEquals(ntaa.getLicenseNumber(), taa.getLicenseNumber());
            entityManager.getTransaction().commit();
            DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
                    connection.createDataSet(expectedDataSet.getTableNames()));
            connection.close();
        } catch (DatabaseUnitException e) {
View Full Code Here

    @Test
    @DatabaseSetup(value = CREATESPECIFIC_DATASET)
    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    public void testRemoveSpecific() throws Exception {
        SpecificTAA taa = new SpecificTAA();

        taa.setId(1L);
        taa.setLicenseNumber(DEFAULT_LICENSENUMBER);
        taa.setVersion(1);
        taaDAO.remove(taa);
    }
View Full Code Here

    @Test
    @DatabaseSetup(value = UPDATESPECIFIC_DATASET)
    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    public void testRemoveSpecific2() throws Exception {
        SpecificTAA taa = new SpecificTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        taaDAO.remove(taa);
    }
View Full Code Here

                }
            }
        }

        if (taa instanceof SpecificTAA) {
            final SpecificTAA staa = (SpecificTAA) taa;
            specific = true;
            draftDate = staa.getDraftDate();
            dateOfSubmissionToDoS = staa.getDateOfSubmissionToDoS();
            dateOfApprovalByDoS = staa.getDateOfApprovalByDoS();
            fullExecutionDate = staa.getFullExecutionDate();

        } else if (taa instanceof GenericTAA) {
            final GenericTAA gtaa = (GenericTAA) taa;
            specific = false;
            gcCOMSATStaffDate = gtaa.getGcCOMSATStaffDate();
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.server.model.SpecificTAA

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.