Amazon.DNXCore.IntegrationTests.ProtocolTests.TestJson_Async C# (CSharp) Method

TestJson_Async() private method

private TestJson_Async ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        private async Task TestJson_Async()
        {
            using (var client = UtilityMethods.CreateClient<AmazonSimpleWorkflowClient>())
            {
                var domainName = "dotnet-test-domain-" + DateTime.Now.ToFileTime();

                await client.RegisterDomainAsync(new RegisterDomainRequest
                {
                    Name = domainName,
                    Description = "Test domain",
                    WorkflowExecutionRetentionPeriodInDays = "5"
                });

                var domains = (await client.ListDomainsAsync(new ListDomainsRequest
                {
                    RegistrationStatus = RegistrationStatus.REGISTERED
                })).DomainInfos;

                Assert.NotNull(domains);
                Assert.NotNull(domains.Infos);
                Assert.NotEqual(0, domains.Infos.Count);

                await client.DeprecateDomainAsync(new DeprecateDomainRequest
                {
                    Name = domainName
                });

                var ure = await AssertExtensions.ExpectExceptionAsync<UnknownResourceException>(client.DeprecateDomainAsync(new DeprecateDomainRequest
                {
                    Name = "really-fake-domain-that-should-not-exist" + DateTime.Now.ToFileTime()
                }));
                Assert.NotNull(ure);
                Assert.NotNull(ure.Message);
                Assert.NotNull(ure.ErrorCode);
                Assert.Equal(ure.ErrorType, ErrorType.Unknown);
            }
        }