r3716 - in trunk: pollen-services/src/main/java/org/chorem/pollen/services/impl pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-number/src/test/java/org/
Author: tchemit Date: 2012-10-01 07:11:24 +0200 (Mon, 01 Oct 2012) New Revision: 3716 Url: http://chorem.org/repositories/revision/pollen/3716 Log: refs #590: Refactor votecounting module (add help on form + review api) Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollVoteCountingService.java trunk/pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting/BordaVoteCountingStrategyTest.java trunk/pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting/CondorcetVoteCountingStrategyTest.java trunk/pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting/CoombsVoteCountingStrategyTest.java trunk/pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategyTest.java trunk/pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting/NormalVoteCountingStrategyTest.java trunk/pollen-votecounting-number/src/test/java/org/chorem/pollen/votecounting/NumberVoteCountingStrategyTest.java trunk/pollen-votecounting-percentage/src/test/java/org/chorem/pollen/votecounting/PercentageVoteCountingStrategyTest.java Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollVoteCountingService.java =================================================================== --- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollVoteCountingService.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollVoteCountingService.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -84,7 +84,7 @@ VoteCounting voteCounting = Polls.getVoteCounting( serviceContext.getVoteCountingFactory(), poll); Preconditions.checkNotNull(voteCounting); - VoteCountingStrategy strategy = voteCounting.newVoteCountingStrategy(); + VoteCountingStrategy strategy = voteCounting.newStrategy(); // create vote counting model GroupOfVoter group = Polls.toSimpleVotersGroup(poll); @@ -101,7 +101,7 @@ VoteCounting voteCounting = Polls.getVoteCounting( serviceContext.getVoteCountingFactory(), poll); Preconditions.checkNotNull(voteCounting); - VoteCountingStrategy strategy = voteCounting.newVoteCountingStrategy(); + VoteCountingStrategy strategy = voteCounting.newStrategy(); // Create a groupVoter including of the root voters GroupOfVoter group = Polls.toGroupOfVoters(poll); Modified: trunk/pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting/BordaVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting/BordaVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting/BordaVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -67,7 +67,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting/CondorcetVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting/CondorcetVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting/CondorcetVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -65,7 +65,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting/CoombsVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting/CoombsVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting/CoombsVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -69,7 +69,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -69,7 +69,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting/NormalVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting/NormalVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting/NormalVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -69,7 +69,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-number/src/test/java/org/chorem/pollen/votecounting/NumberVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-number/src/test/java/org/chorem/pollen/votecounting/NumberVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-number/src/test/java/org/chorem/pollen/votecounting/NumberVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -65,7 +65,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test Modified: trunk/pollen-votecounting-percentage/src/test/java/org/chorem/pollen/votecounting/PercentageVoteCountingStrategyTest.java =================================================================== --- trunk/pollen-votecounting-percentage/src/test/java/org/chorem/pollen/votecounting/PercentageVoteCountingStrategyTest.java 2012-10-01 05:11:10 UTC (rev 3715) +++ trunk/pollen-votecounting-percentage/src/test/java/org/chorem/pollen/votecounting/PercentageVoteCountingStrategyTest.java 2012-10-01 05:11:24 UTC (rev 3716) @@ -66,7 +66,7 @@ @Before public void setUp() throws Exception { - strategy = voteCounting.newVoteCountingStrategy(); + strategy = voteCounting.newStrategy(); } @Test
participants (1)
-
tchemit@users.chorem.org