I am using swagger.io sample Pet Store as a demo, and wanted to run some of the unit tests provided in the csharp client export. Under the Authorize link it informs their is a username and password configured "test", "abc123". I set up the configuration as follows:
[SetUp]
public void Init()
{
var apiKey = new Dictionary<string, string>();
apiKey.Add("ApiKey", "special-key");
var config = new Configuration()
{
//ApiKey = apiKey,
//AccessToken = "special-key",
Username = "test",
Password = "abs123",
};
instance = new PetApi(config);
}
When I setup and debug the following unit test:
[Test]
public void AddPetTest()
{
// TODO uncomment below to test the method and replace null with proper value
var pet = new Pet(name: "TEST", photoUrls: new List<string> { "http://" });
instance.AddPet(pet);
}
I get error:
IO.Swagger.Client.ApiException: 'Error calling AddPet: The request was aborted: Could not create SSL/TLS secure channel.'
I did hunt a bit for the documentation. Is their any documentation on how to configure authentication to use the sample Pet Store?
Thanks.