Esempio n. 1
0
        public void VoteForDelegateTest()
        {
            var dele = DelegateService.GetByUsername(_delegateName);

            List <string> votes = new List <string>();

            votes.Add("+" + dele.Delegate.PublicKey);

            var a2 = JsonConvert.SerializeObject(votes);

            var accCtnrl = new AccountController(_passPhrase);
            var result   = accCtnrl.VoteForDelegate(votes);

            Assert.IsTrue(result.Success || (result.Success == false && result.TransactionIds == null && result.Error == "Failed to add vote, account has already voted for this delegate"));
        }
        public void VoteForDelegateTest()
        {
            var dele = DelegateService.GetByUsername("arkpool");

            List <string> votes = new List <string>();

            votes.Add("+" + dele.PublicKey);

            var a2 = JsonConvert.SerializeObject(votes);

            var accCtnrl = new AccountController("ski rose knock live elder parade dose device fetch betray loan holiday");
            var result   = accCtnrl.VoteForDelegate(votes, "ski rose knock live elder parade dose device fetch betray loan holiday");


            Assert.IsTrue(result.status);
        }
        public void VoteForDelegateTest()
        {
            var dele = DelegateService.GetByUsername(_delegateName);

            List <string> minusVotes = new List <string>();
            List <string> plusVotes  = new List <string>();

            plusVotes.Add("+" + dele.Delegate.PublicKey);
            minusVotes.Add("-" + dele.Delegate.PublicKey);

            var accCtnrl = new AccountController(_passPhrase);

            accCtnrl.VoteForDelegate(minusVotes);
            System.Threading.Thread.Sleep(20000);
            var result = accCtnrl.VoteForDelegate(plusVotes);

            Assert.IsTrue(result.Success || (result.Success == false && result.TransactionIds == null && result.Error == "Failed to add vote, account has already voted for this delegate"), result.Error);
        }
        public void GetByUsernameErrorTest()
        {
            var dele = DelegateService.GetByUsername("NonExistingPool");

            GetByUsernameErrorResultTest(dele);
        }
        public void GetByUsernameTest()
        {
            var dele = DelegateService.GetByUsername(_userName);

            GetByUsernameResultTest(dele);
        }
        public void GetByUsernameTest()
        {
            var dele = DelegateService.GetByUsername("arkpool");

            Assert.AreEqual(dele.Address, "ARAq9nhjCxwpWnGKDgxveAJSijNG8Y6dFQ");
        }