01/03: add PollenResource entity + remove dummy entity stereotype + rename Choice.name to Choice.choiceValue
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit a2fec165a0b2a2a25e7b41a9a442955fb5bc9474 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Jul 9 18:35:57 2014 +0200 add PollenResource entity + remove dummy entity stereotype + rename Choice.name to Choice.choiceValue --- .../persistence/PollenTopiaPersistenceContext.java | 5 +- pollen-persistence/src/main/xmi/pollen.properties | 15 ++++-- pollen-persistence/src/main/xmi/pollen.zargo | Bin 18462 -> 20233 bytes .../org/chorem/pollen/rest/api/PollApiTest.java | 5 +- .../rest/api/converter/JsonArrayConverterTest.java | 4 +- .../rest/api/converter/JsonConverterTest.java | 4 +- .../chorem/pollen/services/bean/ChoiceBean.java | 28 +++++------ .../pollen/services/service/ChoiceService.java | 16 +++--- pollen-services/src/main/resources/fixtures.yaml | 4 +- .../pollen/services/service/PollServiceTest.java | 56 ++++++++++----------- .../services/service/VoteCountingServiceTest.java | 4 +- .../services/service/VoterListServiceTest.java | 4 +- 12 files changed, 73 insertions(+), 72 deletions(-) diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenTopiaPersistenceContext.java b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenTopiaPersistenceContext.java index 8d5f5ea..bbcf552 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenTopiaPersistenceContext.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenTopiaPersistenceContext.java @@ -25,16 +25,15 @@ import org.nuiton.topia.persistence.TopiaIdFactory; import org.nuiton.topia.persistence.internal.HibernateProvider; import org.nuiton.topia.persistence.internal.TopiaHibernateSessionRegistry; import org.nuiton.topia.persistence.internal.support.TopiaFiresSupport; -import org.nuiton.topia.persistence.support.TopiaListenableSupport; public class PollenTopiaPersistenceContext extends AbstractPollenTopiaPersistenceContext { public PollenTopiaPersistenceContext(HibernateProvider hibernateProvider, - TopiaFiresSupport applicationFiresSupport, + TopiaFiresSupport listenableSupport, TopiaIdFactory topiaIdFactory, TopiaHibernateSessionRegistry sessionRegistry) { super(hibernateProvider, - applicationFiresSupport, + listenableSupport, topiaIdFactory, sessionRegistry); } diff --git a/pollen-persistence/src/main/xmi/pollen.properties b/pollen-persistence/src/main/xmi/pollen.properties index 8a4f95e..7e82326 100644 --- a/pollen-persistence/src/main/xmi/pollen.properties +++ b/pollen-persistence/src/main/xmi/pollen.properties @@ -21,18 +21,23 @@ # #L% ###m model.tagvalue.version=2.0 -model.tagValue.notGenerateToString=true -model.tagValue.constantPrefix=PROPERTY_ -model.tagValue.useEnumerationName=true -model.tagValue.indexForeignKeys=true +#model.tagValue.notGenerateToString=true +#model.tagValue.constantPrefix=PROPERTY_ +#model.tagValue.useEnumerationName=true +#model.tagValue.indexForeignKeys=true model.tagValue.hibernateAttributeType.String=string +package.org.chorem.pollen.persistence.entity.stereotype=entity + # Text org.chorem.pollen.persistence.entity.Poll.attribute.description.tagValue.hibernateAttributeType=text org.chorem.pollen.persistence.entity.Choice.attribute.description.tagValue.hibernateAttributeType=text -org.chorem.pollen.persistence.entity.Choice.attribute.name.tagValue.hibernateAttributeType=text +org.chorem.pollen.persistence.entity.Choice.attribute.choiceValue.tagValue.hibernateAttributeType=text org.chorem.pollen.persistence.entity.Comment.attribute.text.tagValue.hibernateAttributeType=text +# Blob +#org.chorem.pollen.persistence.entity.PollenResource.attribute.resourceContent.tagValue.sqlType=blob + # clef naturelle non modifiable sur PollenToken.token org.chorem.pollen.persistence.entity.PollenToken.class.tagValue.naturalIdMutable=true org.chorem.pollen.persistence.entity.PollenToken.attribute.token.stereotype=unique diff --git a/pollen-persistence/src/main/xmi/pollen.zargo b/pollen-persistence/src/main/xmi/pollen.zargo index 7d095e4..72a711c 100644 Binary files a/pollen-persistence/src/main/xmi/pollen.zargo and b/pollen-persistence/src/main/xmi/pollen.zargo differ diff --git a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java index 37cf5b1..8ca03b6 100644 --- a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java +++ b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java @@ -26,7 +26,6 @@ import org.apache.http.client.fluent.Request; import org.chorem.pollen.persistence.entity.*; import org.chorem.pollen.services.PollenFixtures; import org.chorem.pollen.services.bean.ChoiceBean; -import org.chorem.pollen.services.bean.PollenBeans; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -124,11 +123,11 @@ public class PollApiTest extends AbstractPollenRestApiTest { List<ChoiceBean> choices = new ArrayList<>(); ChoiceBean choice1 = new ChoiceBean(); choice1.setChoiceType(ChoiceType.TEXT); - choice1.setValue("choiceA"); + choice1.setChoiceValue("choiceA"); choices.add(choice1); ChoiceBean choice2 = new ChoiceBean(); choice2.setChoiceType(ChoiceType.TEXT); - choice2.setValue("choiceB"); + choice2.setChoiceValue("choiceB"); choices.add(choice2); String choiceStr = getJsonHelper().toJson(choices); diff --git a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java index 649e8a6..815f21b 100644 --- a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java +++ b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java @@ -42,12 +42,12 @@ public class JsonArrayConverterTest { Assert.assertEquals(2, choices.length); Assert.assertNotNull(choices[0]); - Assert.assertEquals("choice1", choices[0].getValue()); + Assert.assertEquals("choice1", choices[0].getChoiceValue()); Assert.assertEquals(ChoiceType.TEXT, choices[0].getChoiceType()); Assert.assertEquals(1, choices[0].getChoiceOrder()); Assert.assertNotNull(choices[1]); - Assert.assertEquals("choice2", choices[1].getValue()); + Assert.assertEquals("choice2", choices[1].getChoiceValue()); Assert.assertEquals(ChoiceType.IMAGE, choices[1].getChoiceType()); Assert.assertEquals(2, choices[1].getChoiceOrder()); diff --git a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonConverterTest.java b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonConverterTest.java index eea755d..8ca1be5 100644 --- a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonConverterTest.java +++ b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonConverterTest.java @@ -78,9 +78,9 @@ public class JsonConverterTest { Assert.assertEquals(CommentVisibility.NOBODY, poll.getCommentVisibility()); Assert.assertEquals(PollType.FREE, poll.getPollType()); // Assert.assertEquals(2, poll.sizeChoice()); -// Assert.assertEquals("choice1", poll.getChoice(0).getName()); +// Assert.assertEquals("choice1", poll.getChoice(0).getChoiceValue()); // Assert.assertEquals(ChoiceType.TEXT, poll.getChoice(0).getChoiceType()); -// Assert.assertEquals("choice2", poll.getChoice(1).getName()); +// Assert.assertEquals("choice2", poll.getChoice(1).getChoiceValue()); // Assert.assertEquals(ChoiceType.IMAGE, poll.getChoice(1).getChoiceType()); String convert = converter.convert(String.class, poll); diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java b/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java index fa0b5fa..40e8691 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java @@ -25,8 +25,6 @@ import org.chorem.pollen.persistence.entity.Choice; import org.chorem.pollen.persistence.entity.ChoiceImpl; import org.chorem.pollen.persistence.entity.ChoiceType; -import java.util.Date; - /** * Created on 5/15/14. * @@ -39,7 +37,7 @@ public class ChoiceBean extends PollenBean<Choice> { protected int choiceOrder; - protected String value; + protected String choiceValue; protected ChoiceType choiceType; @@ -66,16 +64,16 @@ public class ChoiceBean extends PollenBean<Choice> { switch (entity.getChoiceType()) { case TEXT: - setValue(entity.getName()); + setChoiceValue(entity.getChoiceValue()); break; case DATE: - setValue(entity.getName()); + setChoiceValue(entity.getChoiceValue()); break; case IMAGE: - setValue(entity.getName()); + setChoiceValue(entity.getChoiceValue()); break; } @@ -96,21 +94,21 @@ public class ChoiceBean extends PollenBean<Choice> { if (choiceType != null) { switch (choiceType) { case TEXT: - entity.setName(getValue()); + entity.setChoiceValue(getChoiceValue()); break; case DATE: - if ( getValue() != null ) { - entity.setName(getValue()); + if ( getChoiceValue() != null ) { + entity.setChoiceValue(getChoiceValue()); } break; case IMAGE: - if ( getValue() != null ) { - entity.setName(getValue()); + if ( getChoiceValue() != null ) { + entity.setChoiceValue(getChoiceValue()); } break; @@ -133,12 +131,12 @@ public class ChoiceBean extends PollenBean<Choice> { this.permission = permission; } - public String getValue() { - return value; + public String getChoiceValue() { + return choiceValue; } - public void setValue(String value) { - this.value = value; + public void setChoiceValue(String value) { + this.choiceValue = value; } public ChoiceType getChoiceType() { diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java index ae476f4..b08c1c5 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java @@ -98,7 +98,7 @@ public class ChoiceService extends PollenServiceSupport { // // if (connectedUser != null) { // -// creator.setName(connectedUser.getName()); +// creator.setChoiceValue(connectedUser.getChoiceValue()); // creator.setEmail(connectedUser.getEmail()); // } // @@ -220,7 +220,7 @@ public class ChoiceService extends PollenServiceSupport { //FIXME // PollenPrincipal creator = choice.getCreator(); // if (creator != null) { -// principal.setName(creator.getName()); +// principal.setChoiceValue(creator.getChoiceValue()); // principal.setEmail(creator.getEmail()); // } @@ -236,19 +236,19 @@ public class ChoiceService extends PollenServiceSupport { case TEXT: - toSave.setName(choice.getValue()); + toSave.setChoiceValue(choice.getChoiceValue()); break; case DATE: - toSave.setName(choice.getValue()); + toSave.setChoiceValue(choice.getChoiceValue()); break; case IMAGE: - toSave.setName(choice.getValue()); + toSave.setChoiceValue(choice.getChoiceValue()); } @@ -282,7 +282,7 @@ public class ChoiceService extends PollenServiceSupport { } - choiceNames.add(choice1.getName()); + choiceNames.add(choice1.getChoiceValue()); } } @@ -293,7 +293,7 @@ public class ChoiceService extends PollenServiceSupport { case TEXT: - String choiceName = choice.getValue(); + String choiceName = choice.getChoiceValue(); boolean nameNotBlank = checkNotBlank(errors, "value", choiceName, @@ -307,7 +307,7 @@ public class ChoiceService extends PollenServiceSupport { break; case DATE: - Date choiceDate = new Date(Long.parseLong(choice.getValue())); + Date choiceDate = new Date(Long.parseLong(choice.getChoiceValue())); boolean dateNotBlank; if (choiceDate == null) { diff --git a/pollen-services/src/main/resources/fixtures.yaml b/pollen-services/src/main/resources/fixtures.yaml index 6f02abe..b2a4219 100644 --- a/pollen-services/src/main/resources/fixtures.yaml +++ b/pollen-services/src/main/resources/fixtures.yaml @@ -76,14 +76,14 @@ poll_normal: choiceA: &normal_choixA !choice poll: *normal - name: choixA + choiceValue: choixA description: choixA description choiceType: TEXT choiceB: &normal_choixB !choice poll: *normal - name: choixB + choiceValue: choixB description: choixB description choiceType: TEXT diff --git a/pollen-services/src/test/java/org/chorem/pollen/services/service/PollServiceTest.java b/pollen-services/src/test/java/org/chorem/pollen/services/service/PollServiceTest.java index 448e5a8..3d17723 100644 --- a/pollen-services/src/test/java/org/chorem/pollen/services/service/PollServiceTest.java +++ b/pollen-services/src/test/java/org/chorem/pollen/services/service/PollServiceTest.java @@ -85,13 +85,13 @@ public class PollServiceTest extends AbstractPollenServiceTest { ChoiceBean choice1 = new ChoiceBean(); choices.add(choice1); choice1.setChoiceType(ChoiceType.TEXT); - choice1.setValue("A"); + choice1.setChoiceValue("A"); choice1.setDescription("Choice A"); ChoiceBean choice2 = new ChoiceBean(); choice2.setChoiceType(ChoiceType.TEXT); - choice2.setValue("B"); + choice2.setChoiceValue("B"); choice2.setDescription("Choice B"); choices.add(choice2); @@ -117,7 +117,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { ChoiceBean reloadedChoice1 = choiceService.getChoice(createdPollId, createdChoice1.getEntityId()); Assert.assertEquals(createdChoice1, reloadedChoice1); - Assert.assertEquals(choice1.getValue(), createdChoice1.getValue()); + Assert.assertEquals(choice1.getChoiceValue(), createdChoice1.getChoiceValue()); Assert.assertEquals(choice1.getDescription(), createdChoice1.getDescription()); @@ -128,7 +128,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { ChoiceBean reloadedChoice2 = choiceService.getChoice(createdPollId, createdChoice2.getEntityId()); Assert.assertEquals(createdChoice2, reloadedChoice2); - Assert.assertEquals(choice2.getValue(), createdChoice2.getValue()); + Assert.assertEquals(choice2.getChoiceValue(), createdChoice2.getChoiceValue()); Assert.assertEquals(choice2.getDescription(), createdChoice2.getDescription()); } @@ -172,13 +172,13 @@ public class PollServiceTest extends AbstractPollenServiceTest { assertErrorKeyFound(e, "choice[0].value"); } - choice1.setValue("A"); + choice1.setChoiceValue("A"); choice1.setDescription("Choice A"); ChoiceBean choice2 = new ChoiceBean(); choice2.setChoiceType(ChoiceType.TEXT); - choice2.setValue("A"); + choice2.setChoiceValue("A"); choice2.setDescription("Choice B"); choices.add(choice2); @@ -190,7 +190,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { assertErrorKeyFound(e, "choice[1].value"); } - choice2.setValue("B"); + choice2.setChoiceValue("B"); PollenEntityRef<Poll> createdPoll = service.createPoll(poll, choices); @@ -205,7 +205,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // Assert.assertNotNull(createdPoll.getCreator()); // Assert.assertNotNull(createdPoll.getCreator().getTopiaId()); -// Assert.assertNull(createdPoll.getCreator().getValue()); +// Assert.assertNull(createdPoll.getCreator().getChoiceValue()); // Assert.assertNull(createdPoll.getCreator().getEmail()); // Assert.assertNull(createdPoll.getComment()); // Assert.assertNull(createdPoll.getVote()); @@ -224,7 +224,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { ChoiceBean reloadedChoice1 = choiceService.getChoice(createdPollId, createdChoice1.getEntityId()); Assert.assertEquals(createdChoice1, reloadedChoice1); - Assert.assertEquals(choice1.getValue(), createdChoice1.getValue()); + Assert.assertEquals(choice1.getChoiceValue(), createdChoice1.getChoiceValue()); Assert.assertEquals(choice1.getDescription(), createdChoice1.getDescription()); ChoiceBean createdChoice2 = createdChoices.get(1); @@ -234,7 +234,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { ChoiceBean reloadedChoice2 = choiceService.getChoice(createdPollId, createdChoice2.getEntityId()); Assert.assertEquals(createdChoice2, reloadedChoice2); - Assert.assertEquals(choice2.getValue(), createdChoice2.getValue()); + Assert.assertEquals(choice2.getChoiceValue(), createdChoice2.getChoiceValue()); Assert.assertEquals(choice2.getDescription(), createdChoice2.getDescription()); } @@ -253,13 +253,13 @@ public class PollServiceTest extends AbstractPollenServiceTest { // ChoiceBean choice1 = new ChoiceBean(); // choices.add(choice1); // choice1.setChoiceType(ChoiceType.TEXT); -// choice1.setValue("A"); +// choice1.setChoiceValue("A"); // choice1.setDescription("Choice A"); // // // ChoiceBean choice2 = new ChoiceBean(); // choice2.setChoiceType(ChoiceType.TEXT); -// choice2.setValue("B"); +// choice2.setChoiceValue("B"); // choice2.setDescription("Choice B"); // choices.add(choice2); // @@ -289,7 +289,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // //// Assert.assertNotNull(createdPoll.getCreator()); //// Assert.assertNotNull(createdPoll.getCreator().getTopiaId()); -//// Assert.assertNull(createdPoll.getCreator().getValue()); +//// Assert.assertNull(createdPoll.getCreator().getChoiceValue()); //// Assert.assertNull(createdPoll.getCreator().getEmail()); // // List<ChoiceBean> createdChoices = choiceService.getChoices(createdPollId); @@ -304,7 +304,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // ChoiceBean reloadedChoice1 = choiceService.getChoice(createdPollId, createdChoice1.getEntityId()); // Assert.assertEquals(createdChoice1, reloadedChoice1); // -// Assert.assertEquals(choice1.getValue(), createdChoice1.getValue()); +// Assert.assertEquals(choice1.getChoiceValue(), createdChoice1.getChoiceValue()); // Assert.assertEquals(choice1.getDescription(), createdChoice1.getDescription()); //// Assert.assertEquals(createdPoll.getCreator(), createdChoice1.getCreator()); // @@ -315,7 +315,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // ChoiceBean reloadedChoice2 = choiceService.getChoice(createdPollId, createdChoice2.getEntityId()); // Assert.assertEquals(createdChoice2, reloadedChoice2); // -// Assert.assertEquals(choice2.getValue(), createdChoice2.getValue()); +// Assert.assertEquals(choice2.getChoiceValue(), createdChoice2.getChoiceValue()); // Assert.assertEquals(choice2.getDescription(), createdChoice2.getDescription()); //// Assert.assertEquals(createdPoll.getCreator(), createdChoice2.getCreator()); // @@ -330,7 +330,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // VoterListBean reloadedVoterList = voterListService.getVoterList(createdPollId, createdVoterList.getEntityId()); // Assert.assertEquals(createdVoterList, reloadedVoterList); // -// Assert.assertEquals(voterList.getValue(), createdVoterList.getValue()); +// Assert.assertEquals(voterList.getChoiceValue(), createdVoterList.getChoiceValue()); // Assert.assertEquals(voterList.getWeight(), createdVoterList.getWeight(), 0); // // Assert.assertNotNull(createdVoterList.getMember()); @@ -350,14 +350,14 @@ public class PollServiceTest extends AbstractPollenServiceTest { // // ChoiceBean choice1 = new ChoiceBean(); // choice1.setChoiceType(ChoiceType.TEXT); -// choice1.setValue("A"); +// choice1.setChoiceValue("A"); // choice1.setDescription("Choice A"); // // choices.add(choice1); // // ChoiceBean choice2 = new ChoiceBean(); // choice2.setChoiceType(ChoiceType.TEXT); -// choice2.setValue("B"); +// choice2.setChoiceValue("B"); // choice2.setDescription("Choice B"); // // choices.add(choice2); @@ -387,7 +387,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // assertErrorKeyFound(e, "voterList[0].name", "voterList[0].weight", "voterList[0].member"); // } // -// voterList.setValue("voterList1"); +// voterList.setChoiceValue("voterList1"); // voterList.setWeight(1); // // VoterListMemberBean voterListMember1 = new VoterListMemberBean(); @@ -402,7 +402,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // assertErrorKeyFound(e, "voterList[0].member[0].name", "voterList[0].member[0].email", "voterList[0].member[0].weight"); // } // -// voterListMember1.setValue("voter1"); +// voterListMember1.setChoiceValue("voter1"); // voterListMember1.setWeight(0.3); // voterListMember1.setEmail("voter1_pollen.org"); // @@ -417,7 +417,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // voterListMember1.setEmail("voter1@pollen.org"); // // VoterListMemberBean voterListMember2 = new VoterListMemberBean(); -// voterListMember2.setValue("voter1"); +// voterListMember2.setChoiceValue("voter1"); // voterListMember2.setWeight(0.7); // voterListMember2.setEmail("voter1@pollen.org"); // voterList.addMember(voterListMember2); @@ -431,7 +431,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // assertErrorKeyFound(e, "voterList[0].member[1].name", "voterList[0].member[1].email"); // } // -// voterListMember2.setValue("voter2"); +// voterListMember2.setChoiceValue("voter2"); // voterListMember2.setEmail("voter2@pollen.org"); // // PollenEntityRef<Poll> createdPoll = service.createPoll(poll, choices); @@ -457,7 +457,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // //// Assert.assertNotNull(createdPoll.getCreator()); //// Assert.assertNotNull(createdPoll.getCreator().getTopiaId()); -//// Assert.assertNull(createdPoll.getCreator().getValue()); +//// Assert.assertNull(createdPoll.getCreator().getChoiceValue()); //// Assert.assertNull(createdPoll.getCreator().getEmail()); //// Assert.assertNull(createdPoll.getComment()); //// Assert.assertNull(createdPoll.getVote()); @@ -474,7 +474,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // ChoiceBean reloadedChoice1 = choiceService.getChoice(createdPollId, createdChoice1.getEntityId()); // Assert.assertEquals(createdChoice1, reloadedChoice1); // -// Assert.assertEquals(choice1.getValue(), createdChoice1.getValue()); +// Assert.assertEquals(choice1.getChoiceValue(), createdChoice1.getChoiceValue()); // Assert.assertEquals(choice1.getDescription(), createdChoice1.getDescription()); //// Assert.assertEquals(createdPoll.getCreator(), createdChoice1.getCreator()); // @@ -485,7 +485,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // ChoiceBean reloadedChoice2 = choiceService.getChoice(createdPollId, createdChoice2.getEntityId()); // Assert.assertEquals(createdChoice2, reloadedChoice2); // -// Assert.assertEquals(choice2.getValue(), createdChoice2.getValue()); +// Assert.assertEquals(choice2.getChoiceValue(), createdChoice2.getChoiceValue()); // Assert.assertEquals(choice2.getDescription(), createdChoice2.getDescription()); //// Assert.assertEquals(createdPoll.getCreator(), createdChoice2.getCreator()); // @@ -500,7 +500,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { // VoterListBean reloadedVoterList = voterListService.getVoterList(createdPollId, createdVoterList.getEntityId()); // Assert.assertEquals(createdVoterList, reloadedVoterList); // -// Assert.assertEquals(voterList.getValue(), createdVoterList.getValue()); +// Assert.assertEquals(voterList.getChoiceValue(), createdVoterList.getChoiceValue()); // Assert.assertEquals(voterList.getWeight(), createdVoterList.getWeight(), 0); // // Assert.assertNotNull(createdVoterList.getMember()); @@ -513,7 +513,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { //// VoterListMember reloadedVoterListMember1 = voterListService.getMember(createdPoll.getTopiaId(), createdVoterList.getTopiaId(), createdVoterListMember1.getTopiaId()); //// Assert.assertEquals(createdVoterListMember1, reloadedVoterListMember1); //// -//// Assert.assertEquals(reloadedVoterListMember1.getValue(), createdVoterListMember1.getValue()); +//// Assert.assertEquals(reloadedVoterListMember1.getChoiceValue(), createdVoterListMember1.getChoiceValue()); //// Assert.assertEquals(reloadedVoterListMember1.getEmail(), createdVoterListMember1.getEmail()); //// Assert.assertEquals(reloadedVoterListMember1.getWeight(), createdVoterListMember1.getWeight(), 0); //// @@ -525,7 +525,7 @@ public class PollServiceTest extends AbstractPollenServiceTest { //// VoterListMember reloadedVoterListMember2 = voterListService.getMember(createdPoll.getTopiaId(), createdVoterList.getTopiaId(), createdVoterListMember2.getTopiaId()); //// Assert.assertEquals(createdVoterListMember2, reloadedVoterListMember2); //// -//// Assert.assertEquals(reloadedVoterListMember2.getValue(), createdVoterListMember2.getValue()); +//// Assert.assertEquals(reloadedVoterListMember2.getChoiceValue(), createdVoterListMember2.getChoiceValue()); //// Assert.assertEquals(reloadedVoterListMember2.getEmail(), createdVoterListMember2.getEmail()); //// Assert.assertEquals(reloadedVoterListMember2.getWeight(), createdVoterListMember2.getWeight(), 0); // diff --git a/pollen-services/src/test/java/org/chorem/pollen/services/service/VoteCountingServiceTest.java b/pollen-services/src/test/java/org/chorem/pollen/services/service/VoteCountingServiceTest.java index d7f1703..3238aaa 100644 --- a/pollen-services/src/test/java/org/chorem/pollen/services/service/VoteCountingServiceTest.java +++ b/pollen-services/src/test/java/org/chorem/pollen/services/service/VoteCountingServiceTest.java @@ -83,13 +83,13 @@ public class VoteCountingServiceTest extends AbstractPollenServiceTest { ChoiceBean choice1 = new ChoiceBean(); choices.add(choice1); choice1.setChoiceType(ChoiceType.TEXT); - choice1.setValue("A"); + choice1.setChoiceValue("A"); choice1.setDescription("Choice A"); ChoiceBean choice2 = new ChoiceBean(); choice2.setChoiceType(ChoiceType.TEXT); - choice2.setValue("B"); + choice2.setChoiceValue("B"); choice2.setDescription("Choice B"); choices.add(choice2); diff --git a/pollen-services/src/test/java/org/chorem/pollen/services/service/VoterListServiceTest.java b/pollen-services/src/test/java/org/chorem/pollen/services/service/VoterListServiceTest.java index 1fcc304..44ba4c1 100644 --- a/pollen-services/src/test/java/org/chorem/pollen/services/service/VoterListServiceTest.java +++ b/pollen-services/src/test/java/org/chorem/pollen/services/service/VoterListServiceTest.java @@ -100,12 +100,12 @@ public class VoterListServiceTest extends AbstractPollenServiceTest { ChoiceBean choice1 = new ChoiceBean(); choices.add(choice1); choice1.setChoiceType(ChoiceType.TEXT); - choice1.setValue("A"); + choice1.setChoiceValue("A"); choice1.setDescription("Choice A"); ChoiceBean choice2 = new ChoiceBean(); choice2.setChoiceType(ChoiceType.TEXT); - choice2.setValue("B"); + choice2.setChoiceValue("B"); choice2.setDescription("Choice B"); choices.add(choice2); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm