Skip to content

Commit

Permalink
Working SDK Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Thomas committed May 31, 2024
1 parent 46f5687 commit 7863b65
Show file tree
Hide file tree
Showing 18 changed files with 2,861 additions and 23 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = await client.GetJobAsync("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -69,6 +70,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = await client.GetJobAsync("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -103,6 +105,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = client.GetJob("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -122,6 +125,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = client.GetJob("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -194,6 +198,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = await client.CancelJobAsync("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -213,6 +218,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = await client.CancelJobAsync("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -247,6 +253,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = client.CancelJob("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -266,6 +273,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
Response response = client.CancelJob("<name>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -536,6 +544,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
await foreach (BinaryData item in client.GetJobsAsync(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -556,6 +565,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
await foreach (BinaryData item in client.GetJobsAsync(1234, "<continuationToken>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -591,6 +601,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
foreach (BinaryData item in client.GetJobs(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand All @@ -611,6 +622,7 @@ DeidentificationClient client = new DeidentificationClient(endpoint, credential)
foreach (BinaryData item in client.GetJobs(1234, "<continuationToken>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -842,6 +854,7 @@ Operation<BinaryData> operation = await client.CreateJobAsync(WaitUntil.Complete
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -882,6 +895,7 @@ Operation<BinaryData> operation = await client.CreateJobAsync(WaitUntil.Complete
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -936,6 +950,7 @@ Operation<BinaryData> operation = client.CreateJob(WaitUntil.Completed, "<name>"
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down Expand Up @@ -976,6 +991,7 @@ Operation<BinaryData> operation = client.CreateJob(WaitUntil.Completed, "<name>"
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7863b65

Please sign in to comment.