예제 #1
0
        public void TestMultiChainGetStreamItemByKey()
        {
            // Setup
            var processWrapper = new ProcessWrapper {
                Mock = true, ReplyMessage = "[{ \"publishers\": [\"Test01\"], \"key\": \"Test02\", \"data\": \"Test03\", \"confirmations\": 1, \"blocktime\": 2, \"txid\": \"Test04\" }]"
            };
            var chain = new MultiChain(null, processWrapper);

            // Test
            var item = chain.GetStreamItemByKey("Test01", "123");

            // Check
            Assert.AreEqual(1, item.streamitems.Length);
            Assert.AreEqual(1, item.streamitems[0].publishers.Length);
            Assert.AreEqual("Test01", item.streamitems[0].publishers[0]);
            Assert.AreEqual("Test02", item.streamitems[0].key);
            Assert.AreEqual("Test03", item.streamitems[0].data);
            Assert.AreEqual(1, item.streamitems[0].confirmations);
            Assert.AreEqual(2, item.streamitems[0].blocktime);
            Assert.AreEqual("Test04", item.streamitems[0].txid);
            Assert.AreEqual("/c D:\\Development\\Eigenbouw\\bc\\MultiChain\\multichain-cli.exe testchain liststreamkeyitems Test01 123", processWrapper.ProcessInfo.Arguments);
        }
예제 #2
0
 private void button13_Click(object sender, EventArgs e)
 {
     var permissie = chain.GetStreamItemByKey("pinjo", this.key.Text);
 }