示例#1
0
        public void TestMultiChainListStreams()
        {
            // Setup
            var processWrapper = new ProcessWrapper {
                Mock = true, ReplyMessage = "[{ \"name\": \"Test01\", \"createtxid\": \"Test02\", \"open\": true, \"details\": \"abc\", \"subscribed\": true, \"synchronized\": true, \"items\": 1, \"confirmed\": 2, \"keys\": 3, \"publishers\": 4, \"streamref\": \"Test03\" }]"
            };
            var chain = new MultiChain(null, processWrapper);

            // Test
            var stream = chain.ListStreams();

            // Check
            Assert.AreEqual(1, stream.streams.Length);
            Assert.AreEqual("Test01", stream.streams[0].name);
            Assert.AreEqual("Test02", stream.streams[0].createtxid);
            Assert.IsTrue(stream.streams[0].open);
            Assert.AreEqual("abc", stream.streams[0].details);
            Assert.IsTrue(stream.streams[0].subscribed);
            Assert.IsTrue(stream.streams[0].synchronized);
            Assert.AreEqual(1, stream.streams[0].items);
            Assert.AreEqual(2, stream.streams[0].confirmed);
            Assert.AreEqual(3, stream.streams[0].keys);
            Assert.AreEqual(4, stream.streams[0].publishers);
            Assert.AreEqual("Test03", stream.streams[0].streamref);
            Assert.AreEqual("/c D:\\Development\\Eigenbouw\\bc\\MultiChain\\multichain-cli.exe testchain liststreams", processWrapper.ProcessInfo.Arguments);
        }
示例#2
0
 private void button7_Click(object sender, EventArgs e)
 {
     var permissie = chain.ListStreams();
 }