Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            var newaddress = chain.CreateNewAddress();

            config.AppSettings.Settings["ClientAddress"].Value = newaddress;
            config.Save(ConfigurationSaveMode.Modified);
        }
Ejemplo n.º 2
0
        public void TestMultiChainCreateNewAddress()
        {
            // Setup
            var processWrapper = new ProcessWrapper {
                Mock = true, ReplyMessage = "Blockchain test"
            };
            var chain = new MultiChain(null, processWrapper);

            // Test
            var str = chain.CreateNewAddress();

            // Check
            Assert.AreEqual("Blockchain test", str);
            Assert.AreEqual("/c D:\\Development\\Eigenbouw\\bc\\MultiChain\\multichain-cli.exe testchain getnewaddress", processWrapper.ProcessInfo.Arguments);
        }