public void TestSendSingleSliderForm() { string jsonRpcCallId = "jsonrpc id 19347819"; Messaging.SendFormRequest request = new Messaging.SendFormRequest(); request.Member = "*****@*****.**"; request.ParentKey = null; request.Flags = 0; request.AlertFlags = 0; request.Branding = "A68EBEAB5C962B271BD236AAE6595E5C353B56A650F98B760026CAFA094DB8D1"; request.Text = "How much would you pay for this service?"; request.Tag = "my message tag19347819"; request.Context = null; SingleSliderWidget widget = new SingleSliderWidget(); widget.Min = 0.0; widget.Max = 10.0; widget.Step = 0.5; widget.Value = 5.0; widget.Precision = 2; widget.Unit = "$<value/> per month"; request.Form.Widget = widget; request.Form.PositiveButtonCaption = "Next question"; request.Form.NegativeButtonCaption = "Stop poll"; request.Form.NegativeButtonConfirmation = "Do you really want to stop the poll?"; Messaging.SendFormResponse response = this.Api.Send(request, jsonRpcCallId); Assert.IsNotNull(response.Result); }
public void TestSendSingleSliderFom() { SingleSliderWidget widget = new SingleSliderWidget(); widget.Min = 0; widget.Max = 10; widget.Step = 0.5; widget.Value = 5; widget.Precision = 2; widget.Unit = "$<value/> per month"; ValidateSendForm("How much would you pay for this service?", widget); }