Added the SimpleRegistryTest
This object tests the simple registry functionalityvote-registry
parent
109135ae1b
commit
de835a8c13
|
@ -109,7 +109,7 @@ public class SimpleRegistry {
|
||||||
* @return void
|
* @return void
|
||||||
* @throws throws CommunicationException
|
* @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);
|
Tag.Builder[] tags = GetTagsArrayInLength(3);
|
||||||
tags[0].setContent(Tags.ID_TAG + " " + voterID);
|
tags[0].setContent(Tags.ID_TAG + " " + voterID);
|
||||||
tags[1].setContent(Tags.VOTER_ENTRY_TAG.toString());
|
tags[1].setContent(Tags.VOTER_ENTRY_TAG.toString());
|
||||||
|
@ -170,7 +170,7 @@ public class SimpleRegistry {
|
||||||
* @return true if the set voted succeded else false
|
* @return true if the set voted succeded else false
|
||||||
* @throws CommunicationException
|
* @throws CommunicationException
|
||||||
*/
|
*/
|
||||||
public void SetVoted(String id) throws CommunicationException, IOException {
|
public void AddVoter(String id) throws CommunicationException, IOException {
|
||||||
Tag.Builder[] tags = GetTagsArrayInLength(3);
|
Tag.Builder[] tags = GetTagsArrayInLength(3);
|
||||||
tags[0].setContent(Tags.ID_TAG + " " + id);
|
tags[0].setContent(Tags.ID_TAG + " " + id);
|
||||||
tags[1].setContent(Tags.VOTE_ACTION_TAG.toString());
|
tags[1].setContent(Tags.VOTE_ACTION_TAG.toString());
|
||||||
|
|
|
@ -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(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue