public void AddFormSubmissionMode_adds_value(FormSubmissionMode mode, string value) { var builder = new HttpQueryStringBuilder(); HttpQueryStringBuilderExtensions.AddFormSubmissionMode(builder, mode); Assume.That(builder.HasKey("formSubmissionMode")); var query = builder.BuildQuery(); Assert.That(query.Query, Contains.Substring($"formSubmissionMode={value}")); }
public void AddFormSubmissionMode_formSubmissionMode_must_be_a_valid_mode() { var builder = new HttpQueryStringBuilder(); Assert.Throws <ArgumentOutOfRangeException>(() => HttpQueryStringBuilderExtensions.AddFormSubmissionMode(builder, (FormSubmissionMode)100)); }
public void AddFormSubmissionMode_builder_is_required(FormSubmissionMode testValue) { Assert.Throws <ArgumentNullException>(() => HttpQueryStringBuilderExtensions.AddFormSubmissionMode(null, testValue)); }