public void TestSave() { var client = new HttpMessageSettingClient(_factory.CreateClient()); var viewModel = new HttpNotifySettingDetailViewModel { MessageType = Guid.NewGuid().ToString("N"), Url = "http://localhost:5000/WeatherForecast", Method = HttpNotifyMessageMethod.POST }; viewModel.SubmitDataTemplate.Add(new Variable { Name = "a1", Value = "固定值" }); viewModel.SubmitDataTemplate.Add(new Variable { Name = "a2", Value = "被修正值" }); var result = client.Save(viewModel); Assert.True(result.Success); }
public void TestList() { var client = new HttpMessageSettingClient(_factory.CreateClient()); var data = client.List(out var total); }