public void Create() { JamaOptions options = JamaOptionsFactory.Create(); Assert.IsNotNull(options); Assert.IsTrue(options.BaseUrl.IsAbsoluteUri); Assert.IsFalse(string.IsNullOrWhiteSpace(options.Username)); Assert.IsFalse(string.IsNullOrWhiteSpace(options.Password)); }
public static IRestClient Create(JamaOptions jamaOptions, JsonSerializerOptions serializerOptions) { var client = new RestClient(jamaOptions.BaseUrl) { Authenticator = new HttpBasicAuthenticator(jamaOptions.Username, jamaOptions.Password) }; return(client.UseSystemTextJson(serializerOptions)); }