diff --git a/voter-registry/src/main/java/meerkat/SimpleRegistry.java b/voter-registry/src/main/java/meerkat/SimpleRegistry.java index 5269edd..d425619 100644 --- a/voter-registry/src/main/java/meerkat/SimpleRegistry.java +++ b/voter-registry/src/main/java/meerkat/SimpleRegistry.java @@ -109,7 +109,7 @@ public class SimpleRegistry { * @return void * @throws throws CommunicationException */ - public void SetVoted(String voterID, String personalData) throws CommunicationException, IOException { + public void AddVoter(String voterID, String personalData) throws CommunicationException, IOException { Tag.Builder[] tags = GetTagsArrayInLength(3); tags[0].setContent(Tags.ID_TAG + " " + voterID); tags[1].setContent(Tags.VOTER_ENTRY_TAG.toString()); @@ -170,7 +170,7 @@ public class SimpleRegistry { * @return true if the set voted succeded else false * @throws CommunicationException */ - public void SetVoted(String id) throws CommunicationException, IOException { + public void AddVoter(String id) throws CommunicationException, IOException { Tag.Builder[] tags = GetTagsArrayInLength(3); tags[0].setContent(Tags.ID_TAG + " " + id); tags[1].setContent(Tags.VOTE_ACTION_TAG.toString()); diff --git a/voter-registry/src/test/java/SimpleRegistryTest.java b/voter-registry/src/test/java/SimpleRegistryTest.java new file mode 100644 index 0000000..7716908 --- /dev/null +++ b/voter-registry/src/test/java/SimpleRegistryTest.java @@ -0,0 +1,59 @@ +import junit.framework.TestCase; + +/** + * Created by Vladimir Eliezer Tokarev on 1/16/2016. + * Tests the Simple Registry contents + * + */ +public class SimpleRegistryTest extends TestCase{ + + /** + * Initialize SimpleRegistry object + */ + public void setUp(){ + + } + + /** + * Test that add voter creates new correct bulletin board message and add the voter + */ + public void testAddVoter(){ + + } + + /** + * Test that set voted posts creates correct bulletin board message and sets that the user have been voted + */ + public void testSetVoted(){ + + } + + /** + * Test that add to group creates correct bulletin board message and adds a user to a group + */ + public void testAddToGroup(){ + + } + + /** + * Test that remove from group creates correct bulletin board message and removes the user from a group + */ + public void testRemoveFromGroup(){ + + } + + /** + * Test that get groups retrieves the right groups the user are in + */ + public void testGetGroups(){ + + } + + /** + * Test that the personal data outputted about the user is right + */ + public void testGetPersonalIDDetails(){ + + } + +}