Exemplo n.º 1
0
        public void TestConvertToHiddenKey()
        {
            var service   = new BlazeVote.Services.VoteService();
            var hiddenKey = service.GenerateHiddenKey(_group, _publicKey.PublicKeyId);

            Assert.NotNull(hiddenKey);
        }
Exemplo n.º 2
0
        public void TestCreateVoteGroup()
        {
            var service = new BlazeVote.Services.VoteService();

            _group = service.GenerateNewVoteGroup();
            Assert.NotNull(_group);
            Assert.NotNull(_group.HiddenKeys);
            Assert.NotNull(_group.PublicKeys);
        }
Exemplo n.º 3
0
        public void TestGenerateAPublicKey()
        {
            var service = new BlazeVote.Services.VoteService();

            _publicKey = service.GeneratePublicKey(_group);
            Assert.NotNull(_publicKey);
            Assert.IsFalse(string.IsNullOrEmpty(_publicKey.PublicKeyId));
            Assert.IsFalse(_publicKey.IsRegistered);
            Assert.Contains(_publicKey, _group.PublicKeys);
        }