public static async Task RunAsync(string uri, string user, string pass) { var client = new HAsyncClient(new Uri(uri), user, pass); await client.OpenAsync(); Console.WriteLine(await client.GetStringAsync("about", new Dictionary <string, string>(), "text/zinc")); Console.ReadKey(); }
public async Task BadPassTest() { var client = new HAsyncClient(_uri, new AsyncAuthClientContext(_uri, _user, "badpass") { ServerCallAsync = new MockServerCallBuilder().WithFailingLogin().Build(), }); await client.OpenAsync(); }
public async Task LoginTest() { var client = new HAsyncClient(_uri, new AsyncAuthClientContext(_uri, _user, _pass) { ServerCallAsync = new MockServerCallBuilder().Build(), }); await client.OpenAsync(); }
public async Task Read() { var client = new HAsyncClient(_uri, new AsyncAuthClientContext(_uri, _user, _pass) { ServerCallAsync = new MockServerCallBuilder() .WithReadResponse(_oneSiteZinc) .Build(), }); await client.OpenAsync(); await client.readAsync("site", true); }