private void CheckValidParse(string?input, ContentDispositionHeaderValue expectedResult) { var result = ContentDispositionHeaderValue.Parse(input); Assert.Equal(expectedResult, result); }
private void CheckInvalidParse(string?input) { Assert.Throws <FormatException>(() => ContentDispositionHeaderValue.Parse(input)); }
[InlineData(@"attachment; filename==?utf-8?B?Zm9vLeQuaHRtbA==?=")] // @"Uses RFC 2047 style encoded word. ""="" is invalid inside the token production, so this is invalid.", false) }, public void ContentDispositionHeaderValue_ParseInvalid_Throws(string input) { Assert.Throws <FormatException>(() => ContentDispositionHeaderValue.Parse(input)); }