Esempio n. 1
0
        public void InitTests()
        {
            _api = new RiseNodeApi(new ApiInfo
            {
                //Host = "yourhostip",
                //Port = "port"
               // UseHttps = true
            });
            /*
             * 
             * Rise node requires account to be opened which creates new session prior using any account related api either 
             * through web interface or /api/accounts/open. Account tests always fail if no session created on the remote node.
             * The below code opens an account with a secret. The response returns account details.
             */
            _secret = "cabbage chief join task universe hello grab slush page exit update brisk";
            _secondSecret = "process sheriff sea august atom parrot immune finger ticket clean crater celery";

            var response =  _api.OpenAccount(new OpenAccountRequest
            {
                Secret = _secret
            });

            Debug.WriteLine("Account open {0}",response);
            Assert.IsTrue(response.Success, " Couldn't open account ");
            _account = response.Account;

            response = _api.OpenAccount(new OpenAccountRequest
            {
                Secret = _secondSecret
            });

            Debug.WriteLine("Second account open {0}", response);
            Assert.IsTrue(response.Success, " Couldn't open second account ");
            _secondAccount = response.Account;


        }
Esempio n. 2
0
        public void InitTests()
        {
            _api = new RiseNodeApi(new ApiInfo
            {
                Host     = "testnode1.rise.vision",
                Port     = 5566,
                UseHttps = false
            });

            /*
             *
             * Rise node requires account to be opened which creates new session prior using any account related api either
             * through web interface or /api/accounts/open. Account tests always fail if no session created on the remote node.
             * The below code opens an account with a secret. The response returns account details.
             */
            _secret = "cabbage chief join task universe hello grab slush page exit update brisk"; // mainNet
            //_secret = "city penalty metal head silent city bar media slab walk pencil pear"; //testNet
            //_secondSecret = "process sheriff sea august atom parrot immune finger ticket clean crater celery"; //testNet

            var response = _api.OpenAccount(new OpenAccountRequest
            {
                Secret = _secret
            });

            Debug.WriteLine("Account open {0}", response);
            Assert.IsTrue(response.Success, " Couldn't open account ");
            _account = response.Account;

            //response = _api.OpenAccount(new OpenAccountRequest
            //{
            //    Secret = _secondSecret
            //});

            //Debug.WriteLine("Second account open {0}", response);
            //Assert.IsTrue(response.Success, " Couldn't open second account ");
            //_secondAccount = response.Account;
        }
Esempio n. 3
0
        public void InitTests()
        {
            _api = new RiseNodeApi(new ApiInfo
            {
                //Host = "yourhostip",
                //Port = "port"
                // UseHttps = true
            });

            /*
             *
             * Rise node requires account to be opened which creates new session prior using any account related api either
             * through web interface or /api/accounts/open. Account tests always fail if no session created on the remote node.
             * The below code opens an account with a secret. The response returns account details.
             */
            _secret       = "cabbage chief join task universe hello grab slush page exit update brisk";
            _secondSecret = "process sheriff sea august atom parrot immune finger ticket clean crater celery";

            var response = _api.OpenAccount(new OpenAccountRequest
            {
                Secret = _secret
            });

            Debug.WriteLine("Account open {0}", response);
            Assert.IsTrue(response.Success, " Couldn't open account ");
            _account = response.Account;

            response = _api.OpenAccount(new OpenAccountRequest
            {
                Secret = _secondSecret
            });

            Debug.WriteLine("Second account open {0}", response);
            Assert.IsTrue(response.Success, " Couldn't open second account ");
            _secondAccount = response.Account;
        }