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); }
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); }