Exemple #1
0
        private void CheckValidParse(string input, ContentDispositionHeaderValue expectedResult)
        {
            var result = ContentDispositionHeaderValue.Parse(input);

            Assert.Equal(expectedResult, result);
        }
Exemple #2
0
 private void CheckInvalidParse(string input)
 {
     Assert.Throws <FormatException>(() => ContentDispositionHeaderValue.Parse(input));
 }
Exemple #3
0
 [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));
 }