This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 06a402817135b4584e0f0b01f4c376645b7d927a Author: Kevin Morin <morin@codelutin.com> Date: Tue Oct 7 17:57:43 2014 +0200 fix test --- .../service/BenthosBatchPersistenceServiceImpl.java | 14 +++++++------- .../tutti/service/catches/WeightComputingServiceTest.java | 12 ++++++++++++ .../tutti/ui/swing/content/home/SelectCruiseUIHandler.java | 1 + 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java b/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java index 39805d7..b19c083 100644 --- a/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java +++ b/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java @@ -378,13 +378,13 @@ public class BenthosBatchPersistenceServiceImpl extends AbstractPersistenceServi target.setSampleCategoryWeight(source.getWeightBeforeSampling()); } - if (CollectionUtils.isNotEmpty(source.getChildBatchs()) && target.getWeight() != null) { - - // can't use this sample weight on a node - // the weight comes from sampleRatioText, but must NOT be used here - target.setWeight(null); - - } +// if (CollectionUtils.isNotEmpty(source.getChildBatchs()) && target.getWeight() != null) { +// +// // can't use this sample weight on a node +// // the weight comes from sampleRatioText, but must NOT be used here +// target.setWeight(null); +// +// } // Comments target.setComment(source.getComments()); diff --git a/tutti-service/src/test/java/fr/ifremer/tutti/service/catches/WeightComputingServiceTest.java b/tutti-service/src/test/java/fr/ifremer/tutti/service/catches/WeightComputingServiceTest.java index 46dd9b7..7076f01 100644 --- a/tutti-service/src/test/java/fr/ifremer/tutti/service/catches/WeightComputingServiceTest.java +++ b/tutti-service/src/test/java/fr/ifremer/tutti/service/catches/WeightComputingServiceTest.java @@ -182,6 +182,12 @@ public class WeightComputingServiceTest { try { SpeciesBatch batch = speciesBatches.get(i); weightComputingService.computeSpeciesBatch(batch); + //expected error on species batch #0 : Espèces - Le lot de AAPT - Aaptos/V/HV/Vrac n'a pas de poids + //expected error on species batch #1 : Espèces - Le lot de AAPTAAP - Aaptos aaptos/V/HV/Vrac n'a pas de poids + //expected error on species batch #2 : Espèces - Le poids de sous-échantillon du lot ABAL - Abalistes/V/HV - Vrac (42.0kg) est supérieur au poids du lot (28.0kg) + //expected error on species batch #3 : Espèces - Le poids du lot de ABALSTE - Abalistes stellatus/V/HV - Vrac (28.0kg) est inférieur à la somme des poids de ses sous-catégories (30.0kg) + //expected error on species batch #4 : Espèces - Le poids total des mensurations du lot de ABIE - Abietinaria/V/HV - Vrac (0.9kg) est différent du poids du sous-échantillon (28.0kg) + //expected error on species batch #5 : Espèces - Le poids total des mensurations du lot de ABIEABI - Abietinaria abietina/V/HV - Vrac (101.6kg) est supérieur au poids de la catégorie (42.0kg) Assert.fail(); } catch (ApplicationBusinessException e) { //ok, it is supposed to throw an exception @@ -207,6 +213,12 @@ public class WeightComputingServiceTest { try { BenthosBatch batch = benthosBatches.get(i); weightComputingService.computeBenthosBatch(batch); + //expected error on species batch #0 : Benthos - Le lot de ABLEHIA - Ablennes hians/V/HV - Vrac n'a pas de poids + //expected error on species batch #1 : Benthos - Le lot de ABLU - Abludomelita/V/HV - Vrac n'a pas de poids + //expected error on species batch #2 : Benthos - Le poids de sous-échantillon du lot ABLUOBT - Abludomelita obtusata/V/HV - Vrac (42.0kg) est supérieur au poids du lot (28.0kg) + //expected error on species batch #3 : Benthos - Le poids du lot de ABRA - Abra/V/HV - Vrac (28.0kg) est inférieur à la somme des poids de ses sous-catégories (30.0kg) + //expected error on species batch #4 : Benthos - Le poids total des mensurations du lot de ABRAALB - Abra alba/V/HV - Vrac (28.0kg) est différent du poids du sous-échantillon (42.0kg) + //expected error on species batch #5 : Benthos - Le poids total des mensurations du lot de ABRALON - Abra longicallus/V/HV - Vrac (150.6kg) est supérieur au poids de la catégorie (42.0kg) Assert.fail(); } catch (ApplicationBusinessException e) { //ok, it is supposed to throw an exception diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java index 1438b3a..1545c9d 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java @@ -96,6 +96,7 @@ public class SelectCruiseUIHandler extends AbstractTuttiUIHandler<SelectCruiseUI List<Cruise> cruises = null; if (getContext().isProgramFilled()) { selectedProgram = getDataContext().getProgram(); + //TODO check selectprogram is not null cruises = Lists.newArrayList(persistenceService.getAllCruise(selectedProgram.getId())); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.