Skip to content

Commit

Permalink
Update smoke test Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelle committed Mar 16, 2023
1 parent 954b513 commit c9ec845
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions test/ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ namespace MyNamespace;

internal class Program
{
// private static async Task Main(string[] args)
// {
// var client = RestService.For<Petstore.ISwaggerPetstore>("https://petstore3.swagger.io/api/v3");
// var pet = await client.GetPetById(2);

// Console.WriteLine($"Name: {pet.Name}");
// Console.WriteLine($"Category: {pet.Category.Name}");
// Console.WriteLine($"Status: {pet.Status}");
private static async Task Main(string[] args)
{
var client = RestService.For<Petstore.ISwaggerPetstore>("https://petstore3.swagger.io/api/v3");
var pet = await client.GetPetById(2);

// var pets = await client.FindPetsByStatus(Petstore.Status.Available);
// Console.WriteLine("Found " + pets.Count + " available pet(s)");
Console.WriteLine($"Name: {pet.Name}");
Console.WriteLine($"Category: {pet.Category.Name}");
Console.WriteLine($"Status: {pet.Status}");

// var taggedPets = await client.FindPetsByTags(new[] {"tag1Updated", "new"});
// Console.WriteLine("Found " + taggedPets.Count + " tagged pet(s)");
// }
var pets = await client.FindPetsByStatus(Petstore.Status.Available);
Console.WriteLine("Found " + pets.Count + " available pet(s)");

private static void Main(string[] args)
{
var taggedPets = await client.FindPetsByTags(new[] {"tag1Updated", "new"});
Console.WriteLine("Found " + taggedPets.Count + " tagged pet(s)");
}
}

0 comments on commit c9ec845

Please sign in to comment.