Esempio n. 1
0
        public void IsNoAttachmentWhenDispositionIsMissing()
        {
            var response = new DefaultResponse
            {
                Address = Url.Create("http://example.com/foo.png"),
                Headers = new Dictionary <string, string>
                {
                }
            };

            Assert.IsFalse(response.IsAttachment());
        }
Esempio n. 2
0
        public void IsAttachmentWhenContentDispositionHasAttachmentAndFile()
        {
            var response = new DefaultResponse
            {
                Address = Url.Create("http://example.com/foo.png"),
                Headers = new Dictionary <string, string>
                {
                    { HeaderNames.ContentDisposition, "attachment; filename=\"filename.jpg\"" },
                }
            };

            Assert.IsTrue(response.IsAttachment());
        }
Esempio n. 3
0
        public void IsNoAttachmentWhenDispositionIsInline()
        {
            var response = new DefaultResponse
            {
                Address = Url.Create("http://example.com/foo.png"),
                Headers = new Dictionary <string, string>
                {
                    { HeaderNames.ContentDisposition, "inline" },
                }
            };

            Assert.IsFalse(response.IsAttachment());
        }