Exemplo n.º 1
0
        public void TestGetContainer()
        {
            using var client = new Client.Client(key, host);
            using var source = new CancellationTokenSource();
            source.CancelAfter(10000);
            var container = client.GetContainer(cid, context: source.Token).Result;

            Assert.AreEqual(cid, container.Container.CalCulateAndGetId);
            Console.WriteLine(container.Container);
        }
Exemplo n.º 2
0
        public void TestGetContainer()
        {
            var host   = "localhost:8080";
            var key    = "KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr".LoadWif();
            var client = new Client.Client(key, host);
            var cid    = ContainerID.FromBase58String("GcB1gWcwSDbATLQce4J81RYj9B4MhdFqevsnegQnMaye");
            var source = new CancellationTokenSource();

            source.CancelAfter(10000);
            var container = client.GetContainer(source.Token, cid);

            Assert.AreEqual(cid, container.CalCulateAndGetID);
        }