[Suiviobsmer-commits] r1107 - in trunk: . src/announcement wao-business wao-business/src/main/xmi wao-business/src/test/java/fr/ifremer/wao/service wao-ui
Author: bleny Date: 2011-03-28 15:37:54 +0000 (Mon, 28 Mar 2011) New Revision: 1107 Log: prepare release 2.1.2 Added: trunk/src/announcement/release-email-2.1.2.txt trunk/wao-business/src/test/java/fr/ifremer/wao/service/ObsDebTest.java Modified: trunk/changelog.txt trunk/pom.xml trunk/wao-business/pom.xml trunk/wao-business/src/main/xmi/wao.zargo trunk/wao-ui/pom.xml Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2011-03-28 14:39:20 UTC (rev 1106) +++ trunk/changelog.txt 2011-03-28 15:37:54 UTC (rev 1107) @@ -3,6 +3,15 @@ Historique des versions +2.1.2 +----- + +Anomalies ++++++++++ + +- [bleny] #2639 : Les contacts ne sont plus filtrés par société + + 2.1.1 ----- Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-03-28 14:39:20 UTC (rev 1106) +++ trunk/pom.xml 2011-03-28 15:37:54 UTC (rev 1107) @@ -15,7 +15,7 @@ <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>3.0-SNAPSHOT</version> + <version>2.1.2-SNAPSHOT</version> <modules> <module>wao-ui</module> Added: trunk/src/announcement/release-email-2.1.2.txt =================================================================== --- trunk/src/announcement/release-email-2.1.2.txt (rev 0) +++ trunk/src/announcement/release-email-2.1.2.txt 2011-03-28 15:37:54 UTC (rev 1107) @@ -0,0 +1,17 @@ +La nouvelle version 2.1.2 de l'applicatif Wao est disponible. + +Corrections : + +- [bleny] #2639 : Les contacts ne sont plus filtrés par société + +Documentation : + +http://suiviobsmer.labs.libre-entreprise.org/wao/ + +Téléchargement : + +https://labs.libre-entreprise.org/frs/?group_id=154 + +Cordialement, + +L'équipe Wao Modified: trunk/wao-business/pom.xml =================================================================== --- trunk/wao-business/pom.xml 2011-03-28 14:39:20 UTC (rev 1106) +++ trunk/wao-business/pom.xml 2011-03-28 15:37:54 UTC (rev 1107) @@ -10,7 +10,7 @@ <parent> <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>3.0-SNAPSHOT</version> + <version>2.1.2-SNAPSHOT</version> </parent> <groupId>fr.ifremer.wao</groupId> Modified: trunk/wao-business/src/main/xmi/wao.zargo =================================================================== (Binary files differ) Added: trunk/wao-business/src/test/java/fr/ifremer/wao/service/ObsDebTest.java =================================================================== --- trunk/wao-business/src/test/java/fr/ifremer/wao/service/ObsDebTest.java (rev 0) +++ trunk/wao-business/src/test/java/fr/ifremer/wao/service/ObsDebTest.java 2011-03-28 15:37:54 UTC (rev 1107) @@ -0,0 +1,83 @@ +package fr.ifremer.wao.service; + +import fr.ifremer.wao.AbstractServiceTest; +import fr.ifremer.wao.WaoBusinessException; +import fr.ifremer.wao.bean.ConnectedUser; +import fr.ifremer.wao.bean.ConnectedUserImpl; +import fr.ifremer.wao.bean.ObsProgram; +import fr.ifremer.wao.bean.SamplingFilter; +import fr.ifremer.wao.bean.SamplingFilterImpl; +import fr.ifremer.wao.bean.UserRole; +import fr.ifremer.wao.entity.SampleRow; +import fr.ifremer.wao.entity.UserProfile; +import fr.ifremer.wao.entity.UserProfileImpl; +import fr.ifremer.wao.entity.WaoUser; +import fr.ifremer.wao.entity.WaoUserImpl; +import org.apache.commons.lang.StringUtils; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.InputStream; +import java.util.List; + +/** + * @author bleny + */ +public class ObsDebTest extends AbstractServiceTest { + + private static final Logger log = LoggerFactory.getLogger(ObsDebTest.class); + + protected ConnectedUser asAdministrator() { + WaoUser waoUser = new WaoUserImpl(); + UserProfile userProfile = new UserProfileImpl(ObsProgram.OBSDEB, UserRole.ADMIN, true); + ConnectedUser connectedUser = new ConnectedUserImpl(); + connectedUser.setUser(waoUser); + connectedUser.setProfile(userProfile); + return connectedUser; + } + + /** + * As an admin, i must be able to import terrestrial divisions + */ + @Test + public void adminCanImportTerrestrialDistrict() { + InputStream input = getClass().getResourceAsStream("/import/purifiedTerrestrialDivisions.csv"); + manager.getServiceReferential().importTerrestrialDivisions(input); + } + + /** + * As an admin, i must be able to import a sampling plan + */ + @Test + public void adminCanImportSamplingPlan() throws WaoBusinessException { + adminCanImportTerrestrialDistrict(); + InputStream input = getClass().getResourceAsStream("/import/samplingPlan-obsdeb.csv"); + manager.getServiceSampling().importSamplingPlanCsv(input, asAdministrator()); + } + + /** + * As an admin, i should be able to read sampling plan + */ + @Test + @Ignore("not yet implemented") + public void adminCanReadSamplingPlan() throws WaoBusinessException { + adminCanImportTerrestrialDistrict(); + SamplingFilter samplingFilter = manager.getServiceSampling().newSamplingFilter(asAdministrator()); + List<SampleRow> sampleRows = manager.getServiceSampling().getSampleRowsByFilter(samplingFilter); + if (log.isDebugEnabled()) { + log.debug(sampleRows.toString()); + } + Assert.assertEquals(2, sampleRows.size()); + + for (SampleRow sampleRow : sampleRows) { + // i must be able to read those values without error + sampleRow.getObservationUnit().getObservationUnitCode(); + sampleRow.getDay(); + sampleRow.getGroupName(); + Assert.assertTrue(StringUtils.isNotEmpty(sampleRow.getCode())); + } + } +} Modified: trunk/wao-ui/pom.xml =================================================================== --- trunk/wao-ui/pom.xml 2011-03-28 14:39:20 UTC (rev 1106) +++ trunk/wao-ui/pom.xml 2011-03-28 15:37:54 UTC (rev 1107) @@ -10,7 +10,7 @@ <parent> <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>3.0-SNAPSHOT</version> + <version>2.1.2-SNAPSHOT</version> </parent> <groupId>fr.ifremer.wao</groupId>
participants (1)
-
bleny@users.labs.libre-entreprise.org