diff --git a/voter-registry/build.gradle b/voter-registry/build.gradle index 729465a..ac67f25 100644 --- a/voter-registry/build.gradle +++ b/voter-registry/build.gradle @@ -30,7 +30,7 @@ ext { nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : "" } -description = "Meerkat Voter SimpleRegistry application" +description = "Meerkat Voter Registry application" // Your project version version = "0.0" diff --git a/voter-registry/src/main/java/meerkat/SimpleRegistry.java b/voter-registry/src/main/java/meerkat/Registry.java similarity index 95% rename from voter-registry/src/main/java/meerkat/SimpleRegistry.java rename to voter-registry/src/main/java/meerkat/Registry.java index 5a136f8..7df5c23 100644 --- a/voter-registry/src/main/java/meerkat/SimpleRegistry.java +++ b/voter-registry/src/main/java/meerkat/Registry.java @@ -25,16 +25,16 @@ import java.util.List; * Created by Vladimir Eliezer Tokarev on 1/8/2016. * Gives the ability to synchronously manage voters information */ -public class SimpleRegistry implements VoterRegistry{ +public class Registry implements VoterRegistry{ protected DigitalSignature signer; protected AsyncBulletinBoardClient bulletinBoardClient ; protected Crypto.Signature signature; protected InputStream certificateStream; - public SimpleRegistry(DigitalSignature signer, - AsyncBulletinBoardClient communicator, - InputStream certificateStream) { + public Registry(DigitalSignature signer, + AsyncBulletinBoardClient communicator, + InputStream certificateStream) { this.signer = signer; this.bulletinBoardClient = communicator; this.certificateStream = certificateStream; diff --git a/voter-registry/src/test/java/SimpleRegistryTest.java b/voter-registry/src/test/java/SimpleRegistryTest.java index 7b090bc..e0692a4 100644 --- a/voter-registry/src/test/java/SimpleRegistryTest.java +++ b/voter-registry/src/test/java/SimpleRegistryTest.java @@ -1,9 +1,9 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.protobuf.InvalidProtocolBufferException; import junit.framework.TestCase; +import meerkat.Registry; import meerkat.Registry.CollectionMessagesUtils; import meerkat.Registry.RegistryTags; -import meerkat.SimpleRegistry; import meerkat.bulletinboard.AsyncBulletinBoardClient; import meerkat.bulletinboard.ThreadedBulletinBoardClient; import meerkat.crypto.concrete.ECDSASignature; @@ -114,7 +114,7 @@ public class SimpleRegistryTest extends TestCase { } /** - * Initialize SimpleRegistry object + * Initialize Registry object */ public void setUp() { SetSigner(); @@ -128,9 +128,9 @@ public class SimpleRegistryTest extends TestCase { */ public void testSimpleRegistryCreation() { try { - new SimpleRegistry(signer, bulletinBoardClient, certStream); + new Registry(signer, bulletinBoardClient, certStream); } catch (Exception e) { - assert false : "While creating the SimpleRegistry exception have been thrown " + e; + assert false : "While creating the Registry exception have been thrown " + e; } } @@ -173,7 +173,7 @@ public class SimpleRegistryTest extends TestCase { String data = new BigInteger(130, random).toString(32); VoterInfo voterInfo = VoterInfo.newBuilder().setId(VoterID.newBuilder().setId(id)).setInfo(data).build(); - SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream); + Registry registry = new Registry(signer, bulletinBoardClient, certStream); registry.AddVoter(voterInfo, handler); jobSemaphore.acquire(); @@ -201,7 +201,7 @@ public class SimpleRegistryTest extends TestCase { String id = new BigInteger(130, random).toString(32); VoterID voterInfo = VoterID.newBuilder().setId(id).build(); - SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream); + Registry registry = new Registry(signer, bulletinBoardClient, certStream); registry.SetVoted(voterInfo, handler); jobSemaphore.acquire(); @@ -231,7 +231,7 @@ public class SimpleRegistryTest extends TestCase { .setVoterID(VoterID.newBuilder().setId(voterId)) .addGroupID(GroupID.newBuilder().setId(groupId)).build(); - SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream); + Registry registry = new Registry(signer, bulletinBoardClient, certStream); registry.AddToGroups(voterInfo, handler); jobSemaphore.acquire(); @@ -266,7 +266,7 @@ public class SimpleRegistryTest extends TestCase { this.certStream = getClass().getResourceAsStream(CERT1_PEM_EXAMPLE); - SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient,certStream); + Registry registry = new Registry(signer, bulletinBoardClient,certStream); registry.AddToGroups(voterInfo, handler); jobSemaphore.acquire(); @@ -293,7 +293,7 @@ public class SimpleRegistryTest extends TestCase { VoterInfo voterInfo = VoterInfo.newBuilder(). setId(VoterID.newBuilder().setId(id)).setInfo(data).build(); - SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream); + Registry registry = new Registry(signer, bulletinBoardClient, certStream); registry.AddVoter(voterInfo, handler); jobSemaphore.acquire();