public async Task Delete() { var settings = CreateServiceAgentSettings(); var serviceProvider = CreateServiceProvider(settings); var agent = new TestAgent(serviceProvider, Options.Create(settings)); agent.HttpClient = CreateClient(); await agent.DeleteAsync(); var sentData = await agent.GetPreviousDataAsync(); Assert.NotNull(sentData); Assert.Equal("Deleted", sentData.Name); Assert.Equal(123, sentData.Number); }
public async Task PutWithEmptyResult() { var settings = CreateServiceAgentSettings(); var serviceProvider = CreateServiceProvider(settings); var agent = new TestAgent(serviceProvider, Options.Create(settings)); agent.HttpClient = CreateClient(); await agent.PutWithEmptyResultAsync(new TestModel { Name = "Name3", Number = 350 }); var sentData = await agent.GetPreviousDataAsync(); Assert.NotNull(sentData); Assert.Equal("Name3", sentData.Name); Assert.Equal(350, sentData.Number); }